XPSDKLiveVideo

@objc
open class XPSDKLiveVideo : NSObject

High level video object for quick set-up and start a live video.

  • Id of the camera from which will present live video.

    Declaration

    Swift

    open var cameraId: XPSDKViewID?
  • fps

    Frame per second value for the video streaming.

    Declaration

    Swift

    open var fps: Int?
  • The properties of the video stream as width or height of the video and etc.

    Declaration

    Swift

    open var videoProperties: Dictionary<String, Any>?
  • The connection to the mobile server.

    Declaration

    Swift

    open var connection: XPSDKConnection?
  • Instance of the object sends the request for a video and that creates the XPSDKVideoConnection object.

    Declaration

    Swift

    open var videoFactory: XPSDKVideoFactory?
  • The streaming method. XPSDKVideoConnectionMethodPull - Mobile server pushes only one frame on client request. XPSDKVideoConnectionMethodPush - Mobile server pushes unlimited stream of frames to the client on its request.

    Declaration

    Swift

    open var method: XPSDKVideoConnectionMethod
  • The video connection delegate handling the receiving of frames.

    Declaration

    Swift

    open var videoConnectionDelegate: XPSDKVideoConnectionDelegate?
  • Constructs a new LiveVideo object instance.

    @param connection the connection to the Mobile server. @param receiver the object that implements VideoReceiver interface and will receive the Frames from the Mobile server. @param requestParams the parameters that will be included when the request is created.

    Declaration

    Swift

    public convenience init(connection: XPSDKConnection, videoConnectionDelegate: XPSDKVideoConnectionDelegate, videoProperties: Dictionary<String, Any>)
  • Requests a video from the Mobile server and if the request is successfully executed then it sets the value for the videoId variable.

    @return NSError object with the information of the fail request or nol if there is working video connection or successfully created.

    Declaration

    Swift

    public func requestVideo() -> NSError?
  • Sends Rescale request.

    @param width the width of the Frame that will be requested.

    @param height the height of the Frame that will be requested.

    @return Bool {@code true} if the request is sent successfully {@code false} if it is not sent successfully .

    Declaration

    Swift

    public func rescaleVideo(width: Int, height: Int) -> Bool
  • Sends Crop request.

    @param left Left coordinate (X) of the cropping rectangle.

    @param top Top coordinate (Y) of the cropping rectangle.

    @param right Right coordinate (X) of the cropping rectangle.

    @param bottom Bottom coordinate (Y) of the cropping rectangle.

    @return Bool {@code true} if the request is sent successfully {@code false} if it is not sent successfully .

    Declaration

    Swift

    public func cropVideo(left: Int, top: Int, right: Int, bottom: Int) -> Bool
  • Declaration

    Swift

    public func stopVideo()