Web Socket Signaling Specification 1.0.0

This is the Web Socket Signaling API specification.

This document describes the commands, responses, and events of the Dolby.io RTS Signaling Server. This document should aid you during your integration with the Dolby.io Real Time Streaming services.

The structure of each of the messages exchanged with the server follows a certain pattern based on transactions. For that, we make use of a TransactionManager which uses a JSON-based message format to exchange data between both ends. The base message is a JSON object with a type property. There are four message types allowed in this specification: 'cmd', 'response', 'error', and 'event'. Each message type property is used for different purposes and has other attributes depending on the message type.

This document will explain how those objects should be sent and received by the Signaling server, depending on the message type.

Servers

  • wss://live-west.millicast.com/ws/v2wssmillicast

Operations

  • PUB Broadcaster

    Channel for publisher

    Messages sent from the publisher to the service.

    Accepts the following message:

    BroadcasterCommand

    Type of message used by the broadcaster client to send a command to the signaling server and receive a response. It is used when the sending side expects a response from the other side as a result of this command

    It requires a transaction identifier (transID) to match responses with their corresponding commands.
    The command name field determines the structure and content of the 'data' field, which varies based on the type of command being sent.

    anyOf

    Examples

  • SUB Broadcaster

    Channel for publisher

    Messages the publisher receives from the service.

    Accepts one of the following messages:

    • #0BroadcasterResponse

      Type of message sent by the signaling server as a response to a command sent by the broadcaster client. It is used to confirm the acceptance of the command and provide additional data associated with the response.

      The content of the 'payload' field in the response message can vary depending on the type of command message that was sent by the broadcaster.

      anyOf

      Examples

    • #1Error

      It is used to reject a command sent by the other peer and pass some custom data associated to the error.

      object

      Examples

    • #2Event

      Event messages are used when the sending side does not expect any kind of response back. Events can occur at any time.

      anyOf

      Examples

  • PUB Viewer

    Channel for subscribers

    Messages sent from the viewer to the service.

    Accepts the following message:

    ViewerCommand

    Type of message used by the viewer client to send a command to the signaling server and receive a response. It is typically used when the viewer client wants to control their viewing experience, such as selecting a different stream, muting the audio, or switching between different projections.

    Each command sent by the viewer client must include a transaction identifier, or "transID", which allows the client to match the response or error received from the server to the original command.

    anyOf

    Examples

  • SUB Viewer

    Channel for subscribers

    Messages the viewer receives from the service.

    Accepts one of the following messages:

    • #0ViewerResponse

      This message type is used by the server to respond to commands sent by the client viewer, and includes custom data associated with the response.

      For certain command types, including project, unproject, select, unview, mute, record, and unrecord, no data field is necessary for the response. The specific payload structure may vary depending on the type of command sent by the client viewer.

      anyOf

      Examples

    • #1Error

      It is used to reject a command sent by the other peer and pass some custom data associated to the error.

      object

      Examples

    • #2Event

      Event messages are used when the sending side does not expect any kind of response back. Events can occur at any time.

      anyOf

      Examples

Messages

  • #1BroadcasterCommand

    Type of message used by the broadcaster client to send a command to the signaling server and receive a response. It is used when the sending side expects a response from the other side as a result of this command

    It requires a transaction identifier (transID) to match responses with their corresponding commands.
    The command name field determines the structure and content of the 'data' field, which varies based on the type of command being sent.

    anyOf
  • #2ViewerCommand

    Type of message used by the viewer client to send a command to the signaling server and receive a response. It is typically used when the viewer client wants to control their viewing experience, such as selecting a different stream, muting the audio, or switching between different projections.

    Each command sent by the viewer client must include a transaction identifier, or "transID", which allows the client to match the response or error received from the server to the original command.

    anyOf
  • #3BroadcasterResponse

    Type of message sent by the signaling server as a response to a command sent by the broadcaster client. It is used to confirm the acceptance of the command and provide additional data associated with the response.

    The content of the 'payload' field in the response message can vary depending on the type of command message that was sent by the broadcaster.

    anyOf
  • #4ViewerResponse

    This message type is used by the server to respond to commands sent by the client viewer, and includes custom data associated with the response.

    For certain command types, including project, unproject, select, unview, mute, record, and unrecord, no data field is necessary for the response. The specific payload structure may vary depending on the type of command sent by the client viewer.

    anyOf
  • #5Error

    It is used to reject a command sent by the other peer and pass some custom data associated to the error.

    object
  • #6Event

    Event messages are used when the sending side does not expect any kind of response back. Events can occur at any time.

    anyOf
  • #7Layer SelectionLayerSelection

    This is a demonstration of how layer selection works between the viewer and signaling server.

    The interaction is shown in this sequence diagram:

    Layer Selection Diagram
    1. The viewer sends a view event to the server and waits for a response.
    2. The response from the server means the connection was succesfull.
    3. At some point, the server sends the layer event with the information of the available layers in it.
    4. The layer selection is done when the viewer sends to the servera select event with the encodingId of the layer selected.

  • #8MultiviewMultiview

    This is a demonstration of how multiview works both between the signaling server with the Viewer and the Broadcaster.

    Viewer

    1. The viewer sends a view event to the server and waits for a response.
    2. The response from the server means the connection was succesfull.
    3. At some point, the server will send all the active events for each source id that is being published. Each data attribute has the sourceId for that stream, and the null sourceId is the main source.
    4. With that information, the viewer can project the available streams.

    Broadcaster

    1. Each broadcaster with a setted sourceId (except for the main stream that is blank) sends a publish event with the sourceId inside the data attribute.
    2. The response from the server means the publish was succesfull.

Schemas

  • object
    uid: Publish

    Used to perform SDP signaling to publish a stream.

  • object
    uid: Unpublish

    Used to gracefully terminate the connection with the server.

  • object
    uid: View

    Used to perform SDP signaling to connect a viewer.

  • object
    uid: Unview

    Used to gracefully terminate the connection with the server. Needs to pass an empty object.

  • object
    uid: Describe

    See the description of the current connection. Used to see the final SDP, connected cluster, streamId, and suscriberId.
    Needs to pass an empty object

  • object
    uid: Mute

    Allows muting the audio or video stream (The server doesn't send the stream as opposed to local muting). It doesn't seem to work for video

  • object
    uid: Select

    Allows selection of simulcast video layer. Select a layer with encodingId (encodingId is obtained from the data field of an event-type message).

  • object
    uid: Project

    Way of selecting shat source is connected to what WebRTC stream.

  • object
    uid: Unproject

    Not sure if it works (Seems to do nothing)

  • object
    uid: Record

    Type of message used to record a stream.

  • object
    uid: Unrecord

    Type of message used to unrecord a stream.

  • object
    uid: PublishResponse

    The purpose of this message is to confirm that a previous publish message has been received and processed correctly by the API, and to provide additional information related to the publication.

  • object
    uid: ViewResponse

    The purpose of this message is to confirm the successful processing of a request to view a data stream and provide additional information related to the stream view.

  • object
    uid: DescribeResponse

    The purpose of this message is to confirm that the previous describe command has been received and processed correctly and to provide detailed information about a specific data stream.

  • object
    uid: ViewerCountEvent

    Fires when the viewer counts changes.

  • object
    uid: ActiveEvent

    Fires when the live stream is active, or has started broadcasting.

  • object
    uid: InactiveEvent

    This event is sent when the stream stops broadcasting but is still available.

  • object
    uid: StopEvent

    This event is sent when the stream is stopped.

  • object
    uid: LayerEvent

    When broadcasting with simulcast, this events fires when there is an update of the state of the layers in a stream.

  • object
    uid: MigrateEvent

    This event is sent when the server is having problems, is shutting down or when viewers need to move for load balancing purposes.

  • object
    uid: VadEvent

    This event is sent when using multiplexed tracks for audio.