diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index d8855fc018..f9c1f2512f 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -649,6 +649,7 @@ function normalizePlayOptions(playOptions) { function truncatePlayOptions(playOptions) { return { + aspectRatio: playOptions.aspectRatio, fullscreen: playOptions.fullscreen, mediaSourceId: playOptions.mediaSourceId, audioStreamIndex: playOptions.audioStreamIndex, @@ -2663,6 +2664,7 @@ export class PlaybackManager { const audioStreamIndex = playOptions.audioStreamIndex; const subtitleStreamIndex = playOptions.subtitleStreamIndex; const options = { + aspectRatio: playOptions.aspectRatio, maxBitrate, startPosition, isPlayback: null, @@ -2720,7 +2722,7 @@ export class PlaybackManager { } const streamInfo = createStreamInfo(apiClient, item.MediaType, item, mediaSource, startPosition, player); - + streamInfo.aspectRatio = playOptions.aspectRatio; streamInfo.fullscreen = playOptions.fullscreen; const playerData = getPlayerData(player); diff --git a/src/components/themeMediaPlayer.js b/src/components/themeMediaPlayer.js index c8c267532b..202fc90a89 100644 --- a/src/components/themeMediaPlayer.js +++ b/src/components/themeMediaPlayer.js @@ -40,6 +40,7 @@ function playThemeMedia(items, ownerId) { playbackManager.play({ items: currentThemeItems, + aspectRatio: 'cover', fullscreen: false, enableRemotePlayers: false }).then(function () { diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index 0cb7bb419b..1dee23e6e6 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -402,7 +402,7 @@ export class HtmlVideoPlayer { if (options.resetSubtitleOffset !== false) this.resetSubtitleOffset(); const elem = await this.createMediaElement(options); - this.#applyAspectRatio(); + this.#applyAspectRatio(options.aspectRatio || this.getAspectRatio()); await this.updateVideoUrl(options); return this.setCurrentSrc(elem, options); @@ -1608,13 +1608,11 @@ export class HtmlVideoPlayer { if (!dlg) { return import('./style.scss').then(() => { - loading.show(); + if (options.fullscreen) loading.show(); const playerDlg = document.createElement('div'); playerDlg.setAttribute('dir', 'ltr'); - playerDlg.classList.add('videoPlayerContainer'); - if (options.fullscreen) { playerDlg.classList.add('videoPlayerContainer-onTop'); }