fromJson static method
Implementation
static TTVideoEngineMediaSource fromJson(String jsonStr) {
Map<String, dynamic> json = jsonDecode(jsonStr);
if (json['sourceType'] == 1) {
TTVideoEngineMediaSource source = TTVideoEngineUrlSource.fromJsonToMediaSource(json);
return source;
}
throw UnimplementedError("only support DirectUrlSource for now! $jsonStr");
}