26 lines
455 B
TypeScript
26 lines
455 B
TypeScript
/**
|
|
* @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;
|
|
}
|