-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature-liveRoomRender'
- Loading branch information
Showing
5 changed files
with
142 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
enum LiveQuality { | ||
dolby, | ||
super4K, | ||
origin, | ||
bluRay, | ||
superHD, | ||
smooth, | ||
flunt, | ||
} | ||
|
||
extension LiveQualityCode on LiveQuality { | ||
static final List<int> _codeList = [ | ||
30000, | ||
20000, | ||
10000, | ||
400, | ||
250, | ||
150, | ||
80, | ||
]; | ||
int get code => _codeList[index]; | ||
|
||
static LiveQuality? fromCode(int code) { | ||
final index = _codeList.indexOf(code); | ||
if (index != -1) { | ||
return LiveQuality.values[index]; | ||
} | ||
return null; | ||
} | ||
} | ||
|
||
extension VideoQualityDesc on LiveQuality { | ||
static final List<String> _descList = [ | ||
'杜比', | ||
'4K', | ||
'原画', | ||
'蓝光', | ||
'超清', | ||
'高清', | ||
'流畅', | ||
]; | ||
get description => _descList[index]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters