Add constants for app features

This commit is contained in:
Bill Thornton
2025-04-30 17:41:36 -04:00
parent bb810a183a
commit fdcf1b06c3
34 changed files with 211 additions and 129 deletions
+4 -2
View File
@@ -1,3 +1,6 @@
import { AppFeature } from 'constants/appFeature';
import { MediaError } from 'types/mediaError';
import browser from '../../scripts/browser';
import { appHost } from '../../components/apphost';
import * as htmlMediaHelper from '../../components/htmlMediaHelper';
@@ -5,7 +8,6 @@ import profileBuilder from '../../scripts/browserDeviceProfile';
import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
import { MediaError } from 'types/mediaError';
function getDefaultProfile() {
return profileBuilder({});
@@ -278,7 +280,7 @@ class HtmlAudioPlayer {
}
// TODO: Move volume control to PlaybackManager. Player should just be a wrapper that translates commands into API calls.
if (!appHost.supports('physicalvolumecontrol')) {
if (!appHost.supports(AppFeature.PhysicalVolumeControl)) {
elem.volume = htmlMediaHelper.getSavedVolume();
}