DirectCdnStreamingEventHandler
DirectCdnStreamingEventHandler interface class is used by the SDK to send CDN streaming event notifications to the app. The app receives SDK event notifications by inheriting methods of this interface.
onDirectCdnStreamingStateChanged
Callback for changes in CDN streaming state.
final void Function(
DirectCdnStreamingState state,
DirectCdnStreamingReason reason,
String message)? onDirectCdnStreamingStateChanged;
After the host starts pushing streams directly to the CDN, when the streaming state changes, the SDK triggers this callback to report the new state, error code, and message. You can use this information for troubleshooting.
Parameters
- state
- Current streaming state. See DirectCdnStreamingState.
- reason
- Reason for the change in streaming state. See DirectCdnStreamingReason.
- message
- Message corresponding to the state change.
onDirectCdnStreamingStats
Callback for CDN streaming statistics.
final void Function(DirectCdnStreamingStats stats)? onDirectCdnStreamingStats;
During the process of pushing streams directly from the host to the CDN, the SDK triggers this callback once every second.
Parameters
- stats
- Current streaming statistics. See DirectCdnStreamingStats.