Use cover aspect ratio for theme videos
This commit is contained in:
@@ -649,6 +649,7 @@ function normalizePlayOptions(playOptions) {
|
||||
|
||||
function truncatePlayOptions(playOptions) {
|
||||
return {
|
||||
aspectRatio: playOptions.aspectRatio,
|
||||
fullscreen: playOptions.fullscreen,
|
||||
mediaSourceId: playOptions.mediaSourceId,
|
||||
audioStreamIndex: playOptions.audioStreamIndex,
|
||||
@@ -2654,6 +2655,7 @@ export class PlaybackManager {
|
||||
const audioStreamIndex = playOptions.audioStreamIndex;
|
||||
const subtitleStreamIndex = playOptions.subtitleStreamIndex;
|
||||
const options = {
|
||||
aspectRatio: playOptions.aspectRatio,
|
||||
maxBitrate,
|
||||
startPosition,
|
||||
isPlayback: null,
|
||||
@@ -2711,7 +2713,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);
|
||||
|
||||
@@ -40,6 +40,7 @@ function playThemeMedia(items, ownerId) {
|
||||
|
||||
playbackManager.play({
|
||||
items: currentThemeItems,
|
||||
aspectRatio: 'cover',
|
||||
fullscreen: false,
|
||||
enableRemotePlayers: false
|
||||
}).then(function () {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user