mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
fix dolby videos playing (#1202)
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
// ignore_for_file: constant_identifier_names
|
||||
|
||||
enum VideoDecodeFormatType {
|
||||
DVH1('dvh1'),
|
||||
AV1('av01'),
|
||||
HEVC('hev1'),
|
||||
AVC('avc1');
|
||||
DVH1(['dvh1']),
|
||||
AV1(['av01']),
|
||||
HEVC(['hev1', 'hvc1']),
|
||||
AVC(['avc1']);
|
||||
|
||||
String get description => name;
|
||||
final String code;
|
||||
final List<String> codes;
|
||||
|
||||
const VideoDecodeFormatType(this.code);
|
||||
const VideoDecodeFormatType(this.codes);
|
||||
|
||||
static VideoDecodeFormatType fromCode(String code) =>
|
||||
values.firstWhere((i) => i.code == code);
|
||||
values.firstWhere((i) => i.codes.contains(code));
|
||||
|
||||
static VideoDecodeFormatType fromString(String val) =>
|
||||
values.firstWhere((i) => val.startsWith(i.code));
|
||||
values.firstWhere((i) => i.codes.any(val.startsWith));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user