mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-24 01:35:12 +02:00
feat: Loading source plugins
This commit is contained in:
@@ -3,36 +3,34 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
hasAacSupport,
|
||||
hasAc3InHlsSupport,
|
||||
hasAc3Support,
|
||||
hasEac3Support,
|
||||
hasMp3AudioSupport
|
||||
hasAacSupport,
|
||||
hasAc3InHlsSupport,
|
||||
hasAc3Support,
|
||||
hasEac3Support,
|
||||
hasMp3AudioSupport
|
||||
} from './mp4-audio-formats';
|
||||
|
||||
/**
|
||||
* List of supported Ts audio codecs
|
||||
*/
|
||||
export function getSupportedTsAudioCodecs(
|
||||
videoTestElement: HTMLVideoElement
|
||||
): string[] {
|
||||
const codecs = [];
|
||||
export function getSupportedTsAudioCodecs(videoTestElement: HTMLVideoElement): string[] {
|
||||
const codecs = [];
|
||||
|
||||
if (hasAacSupport(videoTestElement)) {
|
||||
codecs.push('aac');
|
||||
}
|
||||
if (hasAacSupport(videoTestElement)) {
|
||||
codecs.push('aac');
|
||||
}
|
||||
|
||||
if (hasMp3AudioSupport(videoTestElement)) {
|
||||
codecs.push('mp3');
|
||||
}
|
||||
if (hasMp3AudioSupport(videoTestElement)) {
|
||||
codecs.push('mp3');
|
||||
}
|
||||
|
||||
if (hasAc3Support(videoTestElement) && hasAc3InHlsSupport(videoTestElement)) {
|
||||
codecs.push('ac3');
|
||||
if (hasAc3Support(videoTestElement) && hasAc3InHlsSupport(videoTestElement)) {
|
||||
codecs.push('ac3');
|
||||
|
||||
if (hasEac3Support(videoTestElement)) {
|
||||
codecs.push('eac3');
|
||||
}
|
||||
}
|
||||
if (hasEac3Support(videoTestElement)) {
|
||||
codecs.push('eac3');
|
||||
}
|
||||
}
|
||||
|
||||
return codecs;
|
||||
return codecs;
|
||||
}
|
||||
|
||||
@@ -7,14 +7,12 @@ import { hasH264Support } from './mp4-video-formats';
|
||||
/**
|
||||
* List of supported ts video codecs
|
||||
*/
|
||||
export function getSupportedTsVideoCodecs(
|
||||
videoTestElement: HTMLVideoElement
|
||||
): string[] {
|
||||
const codecs = [];
|
||||
export function getSupportedTsVideoCodecs(videoTestElement: HTMLVideoElement): string[] {
|
||||
const codecs = [];
|
||||
|
||||
if (hasH264Support(videoTestElement)) {
|
||||
codecs.push('h264');
|
||||
}
|
||||
if (hasH264Support(videoTestElement)) {
|
||||
codecs.push('h264');
|
||||
}
|
||||
|
||||
return codecs;
|
||||
return codecs;
|
||||
}
|
||||
|
||||
@@ -2,31 +2,25 @@
|
||||
* @deprecated - Check @/utils/playback-profiles/index
|
||||
*/
|
||||
|
||||
import {
|
||||
hasAv1Support,
|
||||
hasVp8Support,
|
||||
hasVp9Support
|
||||
} from './mp4-video-formats';
|
||||
import { hasAv1Support, hasVp8Support, hasVp9Support } from './mp4-video-formats';
|
||||
|
||||
/**
|
||||
* Get an array of supported codecs WebM video codecs
|
||||
*/
|
||||
export function getSupportedWebMVideoCodecs(
|
||||
videoTestElement: HTMLVideoElement
|
||||
): string[] {
|
||||
const codecs = [];
|
||||
export function getSupportedWebMVideoCodecs(videoTestElement: HTMLVideoElement): string[] {
|
||||
const codecs = [];
|
||||
|
||||
if (hasVp8Support(videoTestElement)) {
|
||||
codecs.push('vp8');
|
||||
}
|
||||
if (hasVp8Support(videoTestElement)) {
|
||||
codecs.push('vp8');
|
||||
}
|
||||
|
||||
if (hasVp9Support(videoTestElement)) {
|
||||
codecs.push('vp9');
|
||||
}
|
||||
if (hasVp9Support(videoTestElement)) {
|
||||
codecs.push('vp9');
|
||||
}
|
||||
|
||||
if (hasAv1Support(videoTestElement)) {
|
||||
codecs.push('av1');
|
||||
}
|
||||
if (hasAv1Support(videoTestElement)) {
|
||||
codecs.push('av1');
|
||||
}
|
||||
|
||||
return codecs;
|
||||
return codecs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user