loadSource method

  1. @override
Future<void> loadSource(
  1. Source source
)

Starts a new playback session with the provided Source.

Implementation

@override
Future<void> loadSource(Source source) async {
  final fairplayConfig = source.sourceConfig.drmConfig?.fairplay;
  if (fairplayConfig != null) {
    _fairplayHandler = FairplayHandler(fairplayConfig);
  }

  final widevineConfig = source.sourceConfig.drmConfig?.widevine;
  if (widevineConfig != null) {
    _widevineHandler = WidevineHandler(widevineConfig);
  }

  return _invokeMethod<void>(Methods.loadWithSource, source.toJson());
}