mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
chore: implement feedback
This commit is contained in:
parent
c74c0cddde
commit
89ec4cf9cf
2 changed files with 15 additions and 19 deletions
|
@ -1724,7 +1724,7 @@ class PlaybackManager {
|
||||||
}).then(function (deviceProfile) {
|
}).then(function (deviceProfile) {
|
||||||
const audioStreamIndex = params.AudioStreamIndex == null ? getPlayerData(player).audioStreamIndex : params.AudioStreamIndex;
|
const audioStreamIndex = params.AudioStreamIndex == null ? getPlayerData(player).audioStreamIndex : params.AudioStreamIndex;
|
||||||
const subtitleStreamIndex = params.SubtitleStreamIndex == null ? getPlayerData(player).subtitleStreamIndex : params.SubtitleStreamIndex;
|
const subtitleStreamIndex = params.SubtitleStreamIndex == null ? getPlayerData(player).subtitleStreamIndex : params.SubtitleStreamIndex;
|
||||||
const secondarySubtitleStreamIndex = params.SubtitleStreamIndex == null ? getPlayerData(player).secondarySubtitleStreamIndex : params.secondarySubtitleStreamIndex;
|
const secondarySubtitleStreamIndex = params.SecondarySubtitleStreamIndex == null ? getPlayerData(player).secondarySubtitleStreamIndex : params.SecondarySubtitleStreamIndex;
|
||||||
|
|
||||||
let currentMediaSource = self.currentMediaSource(player);
|
let currentMediaSource = self.currentMediaSource(player);
|
||||||
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
|
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
|
||||||
|
@ -2399,7 +2399,7 @@ class PlaybackManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoSetNextTracks(prevSource, mediaSource, audio, subtitle, secondarySubtitle) {
|
function autoSetNextTracks(prevSource, mediaSource, audio, subtitle) {
|
||||||
try {
|
try {
|
||||||
if (!prevSource) return;
|
if (!prevSource) return;
|
||||||
|
|
||||||
|
@ -2416,7 +2416,7 @@ class PlaybackManager {
|
||||||
rankStreamType(prevSource.DefaultSubtitleStreamIndex, prevSource, mediaSource, 'Subtitle');
|
rankStreamType(prevSource.DefaultSubtitleStreamIndex, prevSource, mediaSource, 'Subtitle');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (secondarySubtitle && typeof prevSource.DefaultSecondarySubtitleStreamIndex == 'number') {
|
if (subtitle && typeof prevSource.DefaultSecondarySubtitleStreamIndex == 'number') {
|
||||||
rankStreamType(prevSource.DefaultSecondarySubtitleStreamIndex, prevSource, mediaSource, 'Subtitle', true);
|
rankStreamType(prevSource.DefaultSecondarySubtitleStreamIndex, prevSource, mediaSource, 'Subtitle', true);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -2484,14 +2484,14 @@ class PlaybackManager {
|
||||||
|
|
||||||
return getPlaybackMediaSource(player, apiClient, deviceProfile, maxBitrate, item, startPosition, mediaSourceId, audioStreamIndex, subtitleStreamIndex).then(async (mediaSource) => {
|
return getPlaybackMediaSource(player, apiClient, deviceProfile, maxBitrate, item, startPosition, mediaSourceId, audioStreamIndex, subtitleStreamIndex).then(async (mediaSource) => {
|
||||||
const user = await apiClient.getCurrentUser();
|
const user = await apiClient.getCurrentUser();
|
||||||
const playerData = getPlayerData(player);
|
autoSetNextTracks(prevSource, mediaSource, user.Configuration.RememberAudioSelections, user.Configuration.RememberSubtitleSelections);
|
||||||
|
|
||||||
autoSetNextTracks(prevSource, mediaSource, user.Configuration.RememberAudioSelections, user.Configuration.RememberSubtitleSelections, playerData.secondarySubtitleStreamIndex);
|
|
||||||
|
|
||||||
const streamInfo = createStreamInfo(apiClient, item.MediaType, item, mediaSource, startPosition, player);
|
const streamInfo = createStreamInfo(apiClient, item.MediaType, item, mediaSource, startPosition, player);
|
||||||
|
|
||||||
streamInfo.fullscreen = playOptions.fullscreen;
|
streamInfo.fullscreen = playOptions.fullscreen;
|
||||||
|
|
||||||
|
const playerData = getPlayerData(player);
|
||||||
|
|
||||||
playerData.isChangingStream = false;
|
playerData.isChangingStream = false;
|
||||||
playerData.maxStreamingBitrate = maxBitrate;
|
playerData.maxStreamingBitrate = maxBitrate;
|
||||||
playerData.streamInfo = streamInfo;
|
playerData.streamInfo = streamInfo;
|
||||||
|
|
|
@ -491,20 +491,16 @@ function tryRemoveElement(elem) {
|
||||||
|
|
||||||
this._currentPlayOptions = options;
|
this._currentPlayOptions = options;
|
||||||
|
|
||||||
// Get the secondary track that has been set during this watch session
|
if (secondaryTrackValid) {
|
||||||
let currentSecondaryTrackIndex = playbackManager.getSecondarySubtitleStreamIndex(this);
|
this.#secondarySubtitleTrackIndexToSetOnPlaying = options.mediaSource.DefaultSecondarySubtitleStreamIndex == null ? -1 : options.mediaSource.DefaultSecondarySubtitleStreamIndex;
|
||||||
|
if (this.#secondarySubtitleTrackIndexToSetOnPlaying != null && this.#secondarySubtitleTrackIndexToSetOnPlaying >= 0) {
|
||||||
if (!secondaryTrackValid) {
|
const initialSecondarySubtitleStream = options.mediaSource.MediaStreams[this.#secondarySubtitleTrackIndexToSetOnPlaying];
|
||||||
currentSecondaryTrackIndex = -1;
|
if (!initialSecondarySubtitleStream || initialSecondarySubtitleStream.DeliveryMethod !== 'External') {
|
||||||
playbackManager.setSecondarySubtitleStreamIndex(currentSecondaryTrackIndex, this);
|
this.#secondarySubtitleTrackIndexToSetOnPlaying = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.#secondarySubtitleTrackIndexToSetOnPlaying = currentSecondaryTrackIndex == null ? -1 : currentSecondaryTrackIndex;
|
|
||||||
if (this.#secondarySubtitleTrackIndexToSetOnPlaying != null && this.#secondarySubtitleTrackIndexToSetOnPlaying >= 0) {
|
|
||||||
const initialSecondarySubtitleStream = options.mediaSource.MediaStreams[this.#secondarySubtitleTrackIndexToSetOnPlaying];
|
|
||||||
if (!initialSecondarySubtitleStream || initialSecondarySubtitleStream.DeliveryMethod !== 'External') {
|
|
||||||
this.#secondarySubtitleTrackIndexToSetOnPlaying = -1;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.#secondarySubtitleTrackIndexToSetOnPlaying = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const crossOrigin = getCrossOriginValue(options.mediaSource);
|
const crossOrigin = getCrossOriginValue(options.mediaSource);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue