Skip to content

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

Fix seeking on auto resolution change

Chocobozzz91d9558963c4
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts
index fce8a6c3df..13f4ae9459 100644
--- a/client/e2e/src/po/video-watch.po.ts
+++ b/client/e2e/src/po/video-watch.po.ts
@@ -54,6 +54,12 @@ export class VideoWatchPage {
const videojsEl = element(by.css('div.video-js'))
await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl))
+ // On Android, we need to click twice on "play" (BrowserStack particularity)
+ if (isMobileDevice) {
+ await browser.sleep(3000)
+ await videojsEl.click()
+ }
+
await browser.sleep(7000)
return videojsEl.click()
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index f303301d5f..e4fea09919 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -263,7 +263,7 @@ class PeerTubePlugin extends Plugin {
const options = {
forcePlay: false,
delay,
- seek: currentTime
+ seek: currentTime + (delay / 1000)
}
this.updateVideoFile(newVideoFile, options)
}
@@ -310,6 +310,7 @@ class PeerTubePlugin extends Plugin {
this.player.pause()
this.player.posterImage.show()
this.player.removeClass('vjs-has-autoplay')
+ this.player.removeClass('vjs-has-big-play-button-clicked')
return done()
})