feat: 设置默认画质、音质、解码格式
This commit is contained in:
@ -113,6 +113,14 @@ extension VideoDecodeFormatsCode on VideoDecodeFormats {
|
||||
];
|
||||
get code => _codeList[index];
|
||||
|
||||
static VideoDecodeFormats? fromCode(String code) {
|
||||
final index = _codeList.indexOf(code);
|
||||
if (index != -1) {
|
||||
return VideoDecodeFormats.values[index];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static VideoDecodeFormats? fromString(String val) {
|
||||
var result = VideoDecodeFormats.values.first;
|
||||
for (var i in _codeList) {
|
||||
|
Reference in New Issue
Block a user