diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-08 14:20:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-08 14:20:43 +0200 |
commit | 91d9558963c4eb6e47d74a14ff8d527c6326e0e1 (patch) | |
tree | 60655db5747f410fc93fd2535aa96fc12af9ede1 /client | |
parent | c0f713ce05c26ad01ef06d3b981640d06238186d (diff) | |
download | PeerTube-91d9558963c4eb6e47d74a14ff8d527c6326e0e1.tar.gz PeerTube-91d9558963c4eb6e47d74a14ff8d527c6326e0e1.tar.zst PeerTube-91d9558963c4eb6e47d74a14ff8d527c6326e0e1.zip |
Fix seeking on auto resolution change
Diffstat (limited to 'client')
-rw-r--r-- | client/e2e/src/po/video-watch.po.ts | 6 | ||||
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index fce8a6c3d..13f4ae945 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 { | |||
54 | const videojsEl = element(by.css('div.video-js')) | 54 | const videojsEl = element(by.css('div.video-js')) |
55 | await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl)) | 55 | await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl)) |
56 | 56 | ||
57 | // On Android, we need to click twice on "play" (BrowserStack particularity) | ||
58 | if (isMobileDevice) { | ||
59 | await browser.sleep(3000) | ||
60 | await videojsEl.click() | ||
61 | } | ||
62 | |||
57 | await browser.sleep(7000) | 63 | await browser.sleep(7000) |
58 | 64 | ||
59 | return videojsEl.click() | 65 | return videojsEl.click() |
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index f303301d5..e4fea0991 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 { | |||
263 | const options = { | 263 | const options = { |
264 | forcePlay: false, | 264 | forcePlay: false, |
265 | delay, | 265 | delay, |
266 | seek: currentTime | 266 | seek: currentTime + (delay / 1000) |
267 | } | 267 | } |
268 | this.updateVideoFile(newVideoFile, options) | 268 | this.updateVideoFile(newVideoFile, options) |
269 | } | 269 | } |
@@ -310,6 +310,7 @@ class PeerTubePlugin extends Plugin { | |||
310 | this.player.pause() | 310 | this.player.pause() |
311 | this.player.posterImage.show() | 311 | this.player.posterImage.show() |
312 | this.player.removeClass('vjs-has-autoplay') | 312 | this.player.removeClass('vjs-has-autoplay') |
313 | this.player.removeClass('vjs-has-big-play-button-clicked') | ||
313 | 314 | ||
314 | return done() | 315 | return done() |
315 | }) | 316 | }) |