1
0
Fork 0

Fix seeking on auto resolution change

This commit is contained in:
Chocobozzz 2018-06-08 14:20:43 +02:00
parent c0f713ce05
commit 91d9558963
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 8 additions and 1 deletions

View file

@ -54,6 +54,12 @@ export class VideoWatchPage {
const videojsEl = element(by.css('div.video-js')) const videojsEl = element(by.css('div.video-js'))
await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl)) 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) await browser.sleep(7000)
return videojsEl.click() return videojsEl.click()

View file

@ -263,7 +263,7 @@ class PeerTubePlugin extends Plugin {
const options = { const options = {
forcePlay: false, forcePlay: false,
delay, delay,
seek: currentTime seek: currentTime + (delay / 1000)
} }
this.updateVideoFile(newVideoFile, options) this.updateVideoFile(newVideoFile, options)
} }
@ -310,6 +310,7 @@ class PeerTubePlugin extends Plugin {
this.player.pause() this.player.pause()
this.player.posterImage.show() this.player.posterImage.show()
this.player.removeClass('vjs-has-autoplay') this.player.removeClass('vjs-has-autoplay')
this.player.removeClass('vjs-has-big-play-button-clicked')
return done() return done()
}) })