This topic shows you how to integrate Real Time Streaming (RTS) SDK into ApsaraVideo Player SDK for iOS to play RTS media.

Integrate RTS SDK

You can integrate RTS SDK into ApsaraVideo Player SDK for iOS to play RTS media. For more information about how to integrate ApsaraVideo Player SDK for iOS, see Integration.

The following section describes how to integrate RTS SDK into ApsaraVideo Player SDK for iOS.

  1. Add frameworks to your project.

    You can add frameworks by using the following methods:

    • Download RTS SDK. On the General tab, add the RTS SDK and FfmcdnGlue framework files to the Embedded Binaries section.
    • You can import frameworks by using CocoaPods statements. The newly added artcSource and FfmcdnGlue frameworks are used for RTS playback.
  2. Set the maximum buffer delay for RTS playback.

    ApsaraVideo Player SDK for iOS provides the MaxDelayTime parameter of the AVPConfig method to set the maximum buffer delay for RTS playback. We recommend that you use the following values of the parameters for RTS playback:

    // Query the configuration.
    AVPConfig *config = [self.player getConfig];
    // Set the maximum buffer delay to 1000. The RTS protocol controls the delay.
    config.maxDelayTime = 1000;
    // Set the buffer period to 10 ms. The RTS protocol controls the buffer period.
    config.highBufferDuration = 10;
    config.startBufferDuration = 10;
    // Set other parameters.
    //...
    // Specify the settings for the player.
    [self.player setConfig:config];