refactor: implement new playback method for playbutton (wip)
This commit is contained in:
27 files changed
+1926
-50
No files matched your search
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @deprecated - Check @/utils/playback-profiles/index
|
||||
*/
|
||||
|
||||
import { isWebOS } from "src/utils/browser-detection";
|
||||
|
||||
/**
|
||||
* Get an array of supported codecs
|
||||
*/
|
||||
export function getSupportedWebMAudioCodecs(
|
||||
videoTestElement: HTMLVideoElement,
|
||||
): string[] {
|
||||
const codecs = [];
|
||||
|
||||
codecs.push("vorbis");
|
||||
|
||||
if (
|
||||
!isWebOS() &&
|
||||
videoTestElement.canPlayType('audio/ogg; codecs="opus"').replace(/no/, "")
|
||||
) {
|
||||
codecs.push("opus");
|
||||
}
|
||||
|
||||
return codecs;
|
||||
}
|
||||
Reference in new issue
Block a user