chore: suggest changes to Stream State

Signed-off-by: Lachezar Lechev <lachezar@ambire.com>
This commit is contained in:
Lachezar Lechev 2023-11-27 18:14:46 +02:00
parent 7df70d6177
commit 5b12aa492f
No known key found for this signature in database
GPG key ID: 69BDCB3ED8CE8037

View file

@ -180,16 +180,17 @@ const Player = ({ urlParams, queryParams }) => {
dispatch({ type: 'setProp', propName: 'selectedSubtitlesTrackId', propValue: id });
dispatch({ type: 'setProp', propName: 'selectedExtraSubtitlesTrackId', propValue: null });
streamStateChanged({
subtitleTrackId: id,
extraSubtitleTrackId: null,
subtitleTrack: { type: 'Embedded', id }
// extraSubtitleTrackId: null,
});
}, [streamStateChanged]);
const onExtraSubtitlesTrackSelected = React.useCallback((id) => {
dispatch({ type: 'setProp', propName: 'selectedSubtitlesTrackId', propValue: null });
dispatch({ type: 'setProp', propName: 'selectedExtraSubtitlesTrackId', propValue: id });
streamStateChanged({
subtitleTrackId: null,
extraSubtitleTrackId: id,
subtitleTrack: { type: 'External', id }
// subtitleTrackId: null,
// extraSubtitleTrackId: id,
});
}, []);
const onAudioTrackSelected = React.useCallback((id) => {