addInjectStreamUrl method

  1. @override
Future<void> addInjectStreamUrl(
  1. String url,
  2. LiveInjectStreamConfig config
)

Injects an online media stream to a ChannelProfile.LiveBroadcasting channel.

If this method call succeeds, the server pulls the voice or video stream and injects it into a live channel. This applies to scenarios where all audience members in the channel can watch a live show and interact with each other.

Note

Parameter url The URL address to be added to the ongoing live broadcast. Valid protocols are RTMP, HLS, and FLV.

  • Supported FLV audio codec type: AAC.
  • Supported FLV video codec type: H264(AVC).

Parameter config The LiveInjectStreamConfig object, which contains the configuration information for the added voice or video stream.

Implementation

@override
Future<void> addInjectStreamUrl(String url, LiveInjectStreamConfig config) {
  return _invokeMethod(
      'addInjectStreamUrl', {'url': url, 'config': config.toJson()});
}