TTVideoEngineVidSource.init constructor

TTVideoEngineVidSource.init({
  1. required String? vid,
  2. required String? playAuthToken,
  3. TTVideoEngineResolutionType? resolution,
  4. String? drmLicenseAuthToken,
  5. Uint8List? certData,
})

Implementation

factory TTVideoEngineVidSource.init(
    {required String? vid, required String? playAuthToken, TTVideoEngineResolutionType? resolution,
    String? drmLicenseAuthToken, Uint8List? certData}) {
  if (vid == null || vid.isEmpty || playAuthToken == null || playAuthToken.isEmpty) {
    throw Exception('vid/playAuthToken must be valid');
  } else {
    return TTVideoEngineVidSource(vid: vid, playAuthToken: playAuthToken, resolution: resolution, drmLicenseAuthToken: drmLicenseAuthToken, certData: certData);
  }
}