Skip to content

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

Prevent player mobile buttons flickering

Chocobozzz79a61fa9c6be
diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts
index 708825c9fb..30a2d8538f 100644
--- a/client/src/assets/player/shared/peertube/peertube-plugin.ts
+++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts
@@ -58,6 +58,8 @@ class PeerTubePlugin extends Plugin {
this.initializePlayer()
this.initOnVideoChange()
+ this.player.removeClass('vjs-can-play')
+
this.deleteLegacyIndexedDB()
this.player.on('autoplay-failure', () => {
@@ -85,6 +87,8 @@ class PeerTubePlugin extends Plugin {
const muted = playerOptions.muted !== undefined ? playerOptions.muted : getStoredMute()
if (muted !== undefined) this.player.muted(muted)
+
+ this.player.addClass('vjs-can-play')
})
this.player.ready(() => {
diff --git a/client/src/sass/player/mobile.scss b/client/src/sass/player/mobile.scss
index b0019d2c91..103909d148 100644
--- a/client/src/sass/player/mobile.scss
+++ b/client/src/sass/player/mobile.scss
@@ -161,7 +161,7 @@
}
}
-.vjs-has-started {
+.vjs-can-play.vjs-has-started {
&.vjs-user-active,
&.vjs-paused {