StartDirectCdnStreaming

Starts pushing media streams to the CDN directly.

UFUNCTION(BlueprintCallable, Category = "Agora|RtcEngineProxy")
	int StartDirectCdnStreaming(UIDirectCdnStreamingEventHandler* eventHandler, FString publishUrl, FDirectCdnStreamingMediaOptions& options);

Details

Aogra does not support pushing media streams to one URL repeatedly.

Media options

Agora does not support setting the value of publishCameraTrack and publishCustomVideoTrack as true, or the value of publishMicrophoneTrack and publishCustomAudioTrack as true at the same time. When choosing media setting options (FDirectCdnStreamingMediaOptions), you can refer to the following examples:

If you want to push audio and video streams published by the host to the CDN, the media setting options should be set as follows:

  • publishCustomAudioTrack is set as true and call the PushAudioFrame method
  • publishCustomVideoTrack is set as true and call the PushVideoFrame method
  • publishCameraTrack is set as false (the default value)
  • publishMicrophoneTrack is set as false (the default value)
As of v4.2.0, Agora SDK supports audio-only live streaming. You can set publishCustomAudioTrack or publishMicrophoneTrack in FDirectCdnStreamingMediaOptions as true and call PushAudioFrame to push audio streams.
Note: Agora only supports pushing one audio and video streams or one audio streams to CDN.

Parameters

eventHandler
See FOnDirectCdnStreamingStateChanged and FOnDirectCdnStreamingStats.
publishUrl
The CDN live streaming URL.
options
The media setting options for the host. See FDirectCdnStreamingMediaOptions.

Returns

  • 0: Success.
  • < 0: Failure.