feat: 设置默认画质、音质、解码格式

This commit is contained in:
guozhigq
2023-08-10 16:23:23 +08:00
parent 7528526252
commit 2ff1d02171
7 changed files with 357 additions and 0 deletions

View File

@ -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) {