Skip to content

Commit 29af4c0

Browse files
committed
Fix player portrait mode
1 parent 0390864 commit 29af4c0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

client/src/app/+videos/+video-watch/video-watch.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
705705
pluginsManager: this.pluginService.getPluginsManager(),
706706

707707
autoPlayerRatio: {
708-
cssRatioVariable: '--player-ratio',
709-
cssPlayerPortraitModeVariable: '--player-portrait-mode'
708+
cssRatioVariable: '--co-player-ratio',
709+
cssPlayerPortraitModeVariable: '--co-player-portrait-mode'
710710
}
711711
}
712712
}

client/src/standalone/player/src/shared/peertube/peertube-plugin.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class PeerTubePlugin extends Plugin {
103103
})
104104

105105
this.player.ready(() => {
106-
107106
this.player.on('volumechange', () => {
108107
saveVolumeInStore(this.player.volume())
109108
saveMuteInStore(this.player.muted())
@@ -300,7 +299,7 @@ class PeerTubePlugin extends Plugin {
300299
? defaultRatio
301300
: ratio
302301

303-
el.style.setProperty('--player-ratio', currentRatio + '')
302+
el.style.setProperty(this.options.autoPlayerRatio.cssRatioVariable, currentRatio + '')
304303
}
305304

306305
// ---------------------------------------------------------------------------
@@ -503,7 +502,7 @@ class PeerTubePlugin extends Plugin {
503502
}
504503

505504
private setInactivityTimeout (timeout: number) {
506-
(this.player as any).cache_.inactivityTimeout = timeout
505+
;(this.player as any).cache_.inactivityTimeout = timeout
507506
this.player.options_.inactivityTimeout = timeout
508507
}
509508

0 commit comments

Comments
 (0)