To use the co-streaming feature, you must create a co-streaming application and configure the ingest and streaming domains for co-streaming and the streaming domain of viewers. This topic describes how to perform these operations.

Create a co-streaming application

  1. Log on to the ApsaraVideo Live console.
  2. In the left-side navigation pane, choose Scenario-based Services > Co-streaming Management > Co-streaming Applications.
  3. Click Create Co-streaming Application. The buy page is displayed, as shown in the following figure.
    Enable co-streaming
  4. Enter a custom name in the Instance Name field, tick the Terms of Service checkbox, and then click Buy Now.

    After a success prompt appears, refresh the Co-streaming Applications page. You can see the created co-streaming application.

    Note

    Co-streaming is a pay-as-you-go feature. You are not charged fees when you enable the feature.

Configure the ingest and streaming domains for co-streaming

If there are no streaming and ingest domains for co-streaming on the Domain Management page, you must add corresponding domain names first. For more information, see Add a domain name.

Enable RTS 2.0 for the ingest and streaming domains

Co-streaming for ingest and streaming domains is built based on RTS 2.0. RTS 2.0 provides a co-streaming latency of 200 ms to 400 ms.

  1. In the left-side navigation pane of the ApsaraVideo Live console, click Domains. The Domain Management page appears.
  2. Find the ingest domain for co-streaming and click Domain Settings in the Actions column.
    Ingest domain
  3. On the page that appears, choose Streaming Management > RTS-based Stream Ingest. Then, turn on RTS-based Stream Ingest.
  4. Select RTS 2.0 for Stream Ingest for Version. Stream relay is not required for co-streaming.
    RTS 2.0 for Stream Ingest
  5. Click OK.
  6. Return to the Domain Management page. Find the streaming domain for co-streaming and click Domain Settings in the Actions column.
    Streaming domain
  7. On the page that appears, choose Streaming Management > RTS. Then, turn on RTS.
  8. Select RTS 2.0 for Version and select Communication and Interaction for Scenario.
    RTS 2.0
  9. Click OK.

Configure the ingest and streaming domains for co-streaming

  1. In the left-side navigation pane of the ApsaraVideo Live console, choose Scenario-based Services > Co-streaming Management > Co-streaming Applications.
  2. On the Co-streaming Applications page, find the application that you want to configure and click Manage in the Actions column.
    Manage
  3. On the Application Information tab, click Configure Domain Name in the Ingest and Streaming Domains for Co-streaming section.
  4. In the dialog box that appears, select the ingest domain and streaming domain for which RTS 2.0 is enabled.
    Ingest and Streaming Domains for Co-streaming
  5. Click OK.

Configure the streaming domain of viewers

If there is no streaming domain of viewers on the Domain Management page, you must add the domain name first. For more information, see Add a domain name.

Check whether RTS 2.0 is enabled for the streaming domain of viewers

Important Do not enable RTS 2.0 for this streaming domain. If you enable RTS 2.0, relayed stream pulling fails.
  1. In the left-side navigation pane of the ApsaraVideo Live console, click Domains. The Domain Management page appears.
  2. Find the streaming domain of viewers and click Domain Settings in the Actions column.
  3. On the page that appears, choose Streaming Management > RTS.
  4. On the page that appears, check whether the version of RTS is RTS 2.0.

    If the version of RTS is RTS 2.0, change the version to RTS 1.0 or turn off RTS.

Configure the streaming domain of viewers

On the Application Information tab of the page for managing the co-streaming application, click Configure Domain Name in the Streaming Domain of Viewers section.

Streaming Domain of Viewers

Configure stream mixing

On the Mixed-Stream Configuration page, you can learn from the notes and sample code about how to implement stream mixing in interactive co-streaming scenarios. You can click iOS or Android to view the sample code for iOS or Android.

Mixed-Stream Configuration