Add DTS enabling option
This commit is contained in:
@@ -547,7 +547,7 @@ export default function (options) {
|
||||
hlsInFmp4VideoAudioCodecs.push('mp2');
|
||||
}
|
||||
|
||||
let supportsDts = options.supportsDts;
|
||||
let supportsDts = appSettings.enableDts() || options.supportsDts;
|
||||
if (supportsDts == null) {
|
||||
supportsDts = canPlayDts(videoTestElement);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,19 @@ class AppSettings {
|
||||
return toBoolean(this.get('limitSupportedVideoResolution'), false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Enable DTS' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Enable DTS' or undefined.
|
||||
* @return {boolean} 'Enable DTS' state.
|
||||
*/
|
||||
enableDts(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('enableDts', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('enableDts'), false);
|
||||
}
|
||||
|
||||
set(name, value, userId) {
|
||||
const currentValue = this.get(name, userId);
|
||||
localStorage.setItem(this.#getKey(name, userId), value);
|
||||
|
||||
Reference in New Issue
Block a user