Player
public class Player : LinphoneObject
Player interface.
-
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> Player -
Declaration
Swift
public var getCobject: OpaquePointer? { get } -
Declaration
Swift
public func addDelegate(delegate: PlayerDelegate) -
Declaration
Swift
public func removeDelegate(delegate: PlayerDelegate) -
Returns the current LinphonePlayerCbsCbs object.
Declaration
Swift
public var currentDelegate: PlayerDelegate? { get }Return Value
The current LinphonePlayerCbs object
-
Get the current position in the opened file.
Declaration
Swift
public var currentPosition: Int { get }Return Value
The current position in the opened file
-
Get the duration of the opened file.
Declaration
Swift
public var duration: Int { get }Return Value
The duration of the opened file
-
Returns whether the file has video and if it can be displayed.
Declaration
Swift
public var isVideoAvailable: Bool { get }Return Value
true if file has video and it can be displayed, false otherwise
-
Assign a user pointer to the player.
Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }Return Value
The user pointer associated with the player.
-
Set the volume gain of the player.
Declaration
Swift
public var volumeGain: Float { get set }Return Value
Percentage of the gain. Valid values are in [ 0.0 : 1.0 ].
-
Sets a window id to be used to display video if any.
Declaration
Swift
public var windowId: UnsafeMutableRawPointer? { get set }Parameters
windowIdThe window id pointer to use.
-
Close the opened file.
Declaration
Swift
public func close() -
Create a window id to be used to display video if any.
Declaration
Swift
public func createWindowId() throws -> UnsafeMutableRawPointerReturn Value
window_id The window id pointer to use.
-
Open a file for playing. Actually, only WAVE and MKV/MKA file formats are supported and a limited set of codecs depending of the selected format. Here are the list of working combinations:
Declaration
Swift
public func open(filename: String) throwsParameters
filenameThe path to the file to open
-
Pause the playing of a file.
Declaration
Swift
public func pause() throwsReturn Value
0 on success, a negative value otherwise
-
Seek in an opened file.
Declaration
Swift
public func seek(timeMs: Int) throwsParameters
timeMsThe time we want to go to in the file (in milliseconds).
Return Value
0 on success, a negative value otherwise.
-
Start playing a file that has been opened with open().
Declaration
Swift
public func start() throwsReturn Value
0 on success, a negative value otherwise
Player Class Reference