Skip to content

Commit

Permalink
remove the support for maxAudioChannels query param
Browse files Browse the repository at this point in the history
  • Loading branch information
unclekingpin committed Nov 25, 2023
1 parent 09607f3 commit 3ddaa0b
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/routes/Player/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ const styles = require('./styles');
const Player = ({ urlParams, queryParams }) => {
const { t } = useTranslation();
const { chromecast, shell, core } = useServices();
const [forceTranscoding, maxAudioChannels] = React.useMemo(() => {
return [
queryParams.has('forceTranscoding'),
queryParams.has('maxAudioChannels') ? parseInt(queryParams.get('maxAudioChannels'), 10) : null
];
const forceTranscoding = React.useMemo(() => {
return queryParams.has('forceTranscoding');
}, [queryParams]);
const [player, videoParamsChanged, timeChanged, pausedChanged, ended] = usePlayer(urlParams);
const [settings, updateSettings] = useSettings();
Expand Down Expand Up @@ -286,13 +283,7 @@ const Player = ({ urlParams, queryParams }) => {
:
0,
forceTranscoding: forceTranscoding || casting,
maxAudioChannels: typeof maxAudioChannels === 'number' ?
maxAudioChannels
:
settings.surroundSound ?
32
:
2,
maxAudioChannels: settings.surroundSound ? 32 : 2,
streamingServerURL: streamingServer.baseUrl.type === 'Ready' ?
casting ?
streamingServer.baseUrl.content
Expand All @@ -307,7 +298,7 @@ const Player = ({ urlParams, queryParams }) => {
shellTransport: shell.active ? shell.transport : null,
});
}
}, [streamingServer.baseUrl, player.selected, player.metaItem, forceTranscoding, maxAudioChannels, casting]);
}, [streamingServer.baseUrl, player.selected, player.metaItem, forceTranscoding, casting]);
React.useEffect(() => {
if (videoState.stream !== null) {
dispatch({
Expand Down

0 comments on commit 3ddaa0b

Please sign in to comment.