refactor: implement new playback method for playbutton (wip)

This commit is contained in:
Prayag Prajapati committed 2024-04-24 16:19:45 +05:30
1 parent a7a5d45b33
commit ef003e04a5
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;
}