WCSSession

public class WCSSession

Undocumented

  • Undocumented

    Declaration

    Swift

    public init(_ options: FPWCSApi2SessionOptions) throws
  • Add session event callback.

    Declaration

    Swift

    public func on(_ event: kFPWCSSessionStatus, _ callback: @escaping SessionCallback)

    Parameters

    event

    kFPWCSSessionStatus event type

    callback

    SessionCallback callback block

  • Connect to server.

    Note that connect can be called only once.

    Declaration

    Swift

    public func connect()
  • Disconnect from server

    Declaration

    Swift

    public func disconnect()
  • Get session status

    Declaration

    Swift

    public func getStatus() -> kFPWCSSessionStatus

    Return Value

    kFPWCSSessionStatus session status

  • Create stream.

    Declaration

    Swift

    public func createStream(_ options: FPWCSApi2StreamOptions) throws -> WCSStream

    Parameters

    options

    FPWCSApi2StreamOptions stream configuration options

    Return Value

    WCSStream newly created stream