Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix player portrait mode

Chocobozzz29af4c091289
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index 6e186231e6..24c663eed0 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -705,8 +705,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
pluginsManager: this.pluginService.getPluginsManager(),
autoPlayerRatio: {
- cssRatioVariable: '--player-ratio',
- cssPlayerPortraitModeVariable: '--player-portrait-mode'
+ cssRatioVariable: '--co-player-ratio',
+ cssPlayerPortraitModeVariable: '--co-player-portrait-mode'
}
}
}
diff --git a/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts b/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts
index d15ef7798b..98b955bf4f 100644
--- a/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts
+++ b/client/src/standalone/player/src/shared/peertube/peertube-plugin.ts
@@ -103,7 +103,6 @@ class PeerTubePlugin extends Plugin {
})
this.player.ready(() => {
-
this.player.on('volumechange', () => {
saveVolumeInStore(this.player.volume())
saveMuteInStore(this.player.muted())
@@ -300,7 +299,7 @@ class PeerTubePlugin extends Plugin {
? defaultRatio
: ratio
- el.style.setProperty('--player-ratio', currentRatio + '')
+ el.style.setProperty(this.options.autoPlayerRatio.cssRatioVariable, currentRatio + '')
}
// ---------------------------------------------------------------------------
@@ -503,7 +502,7 @@ class PeerTubePlugin extends Plugin {
}
private setInactivityTimeout (timeout: number) {
- (this.player as any).cache_.inactivityTimeout = timeout
+ ;(this.player as any).cache_.inactivityTimeout = timeout
this.player.options_.inactivityTimeout = timeout
}