TTVideoEngineVidSource.init constructor

TTVideoEngineVidSource.init({
  1. required String? vid,
  2. required String? playAuthToken,
  3. TTVideoEngineResolutionType? resolution,
})

Implementation

factory TTVideoEngineVidSource.init(
    {required String? vid, required String? playAuthToken, TTVideoEngineResolutionType? resolution}) {
  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);
  }
}