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'))
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()

View File

@ -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()
})