BasePlayer
@objc public class BasePlayer: NSObject
Base class for audio, video and photo player
-
The Connection delegate protocol defines the event methods available for channel Connection/DisConnection.
Declaration
Swift
public weak var connectionDelegate: ConnectionDelegate? = nil
-
Disconnects to the channel. This method will asynchronously call the delegate’s onDisconnect method and post a ChannelEvent. - parameter completionHandler: callback handler of OnDisconnect
Declaration
Swift
@objc public func disconnect(completionHandler: ((error: NSError?) -> Void)? = nil)Parameters
completionHandlercallback handler of OnDisconnect
-
Play last sent media contents.
Declaration
Swift
@objc public func play() -
Pause currently playing media.
Declaration
Swift
@objc public func pause() -
Stop currently playing media.
Declaration
Swift
@objc public func stop() -
Mute the volume of player on a connected device.
Declaration
Swift
@objc public func mute() -
UnMute the volume of player on a connected device.
Declaration
Swift
@objc public func unMute() -
Request the volume of player on a connected device.
Declaration
Swift
@objc public func getVolume() -
Request previous to the player on a connected device.
Declaration
Swift
@objc public func previous() -
Request next to the player on a connected device.
Declaration
Swift
@objc public func next() -
Set volume on device playing media.
Declaration
Swift
@objc public func setVolume(volume: UInt8)Parameters
volumeInteger value between 0 and 100.
-
increase volume of the player by 1.
Declaration
Swift
@objc public func volumeUp() -
decrease volume of the player by 1.
Declaration
Swift
@objc public func volumeDown()
BasePlayer Class Reference