Player

public class Player : LinphoneObject

Player interface.

  • Undocumented

    Declaration

    Swift

    public static func getSwiftObject(cObject: OpaquePointer) -> Player
  • Undocumented

    Declaration

    Swift

    public var getCobject: OpaquePointer? { get }
  • The state of a Player.

    See more

    Declaration

    Swift

    public enum State : Int
  • Player interface.

    Declaration

    Swift

    public func addDelegate(delegate: PlayerDelegate)
  • Player interface.

    Declaration

    Swift

    public func removeDelegate(delegate: PlayerDelegate)
  • Returns the Core object managing this player’s call, if any.

    Declaration

    Swift

    public var core: Core? { get }

    Return Value

    the Core object associated

  • 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

  • Get the current state of a player.

    Declaration

    Swift

    public var state: Player.State { get }

    Return Value

    The current State of the player.

  • Retrieve the user pointer associated with the player.

    Declaration

    Swift

    public var userData: UnsafeMutableRawPointer? { get set }

    Return Value

    The user pointer associated with the player.

  • Get 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

    windowId

    The window id pointer to use.

  • Close the opened file.

    Declaration

    Swift

    public func close()
  • Open a file for playing.

    Declaration

    Swift

    public func open(filename: String) throws

    Parameters

    filename

    The path to the file to open

  • Pause the playing of a file.

    Declaration

    Swift

    public func pause() throws

    Return Value

    0 on success, a negative value otherwise

  • Seek in an opened file.

    Declaration

    Swift

    public func seek(timeMs: Int) throws

    Parameters

    timeMs

    The 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() throws

    Return Value

    0 on success, a negative value otherwise