Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.2.0 to 7.2.4 playback does not restart with loop #231

Closed
Everlag opened this issue Sep 14, 2018 · 7 comments · Fixed by #259
Closed

7.2.0 to 7.2.4 playback does not restart with loop #231

Everlag opened this issue Sep 14, 2018 · 7 comments · Fixed by #259

Comments

@Everlag
Copy link
Contributor

Everlag commented Sep 14, 2018

Description

Video fails to play after its reaches the end. This also breaks looping.
Briefly describe the issue.

Repro:
http://jsbin.com/kamavaduru/1/edit?html,output

Sources

Is a certain source or a certain segment affected? please provide a public (accesible over the internet) link to it below.

Steps to reproduce

  1. Start video
  2. Let video end(seeking to near end is fine); play button should change to replay

Results

Expected

Video continues playback at start

Error output

Spinner appears and does not go away

Additional Information

A related issue where playback could not be manually restarted by clicking play was solved in 1.2.5
videojs/video.js#5436

videojs-http-streaming version

videojs-http-streaming 1.2.5 (Pinned version for video.js 7.2.3; latest as of 9/14/2018)

videojs version

7.2.3

Browsers

  • chrome
    Others may be affected but chrome is used for baseline sanity checking

Platforms

  • Ubuntu 18.04
  • Windows 10

Other Plugins

None

Other JavaScript

None(yes in production, no in repro above)

@welcome
Copy link

welcome bot commented Sep 14, 2018

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@gesinger
Copy link
Contributor

Thanks for posting. We recently changed some logic around listening for seeking events, and it looks like that caused this issue. We'll take a look into it.

@Everlag
Copy link
Contributor Author

Everlag commented Sep 25, 2018

Any news on this issue?

@Everlag Everlag changed the title 7.2.0 to 7.2.3 playback does not restart with loop 7.2.0 to 7.2.4 playback does not restart with loop Oct 3, 2018
@Everlag
Copy link
Contributor Author

Everlag commented Oct 3, 2018

Digging into the VHS 1.2.1 -> 1.2.3 diff, I imagined the problem line was here, this.seekTo_(0);

However, I found that was never invoked when I built it locally. Even further, the options_.seekTo was also never invoked.

videojs.log.history() doesn't seem to contain useful errors or differences between the two versions.

Any ideas?

@ghost
Copy link

ghost commented Oct 12, 2018

!!!! READ AT YOUR OWN RISK !!!!

if anyone is interested i developed a little workaround (it's hacky but it seems to work) which i'm going to use until an official patch (i will also try to work on something better but i have little hope :)

my fork is here: https://github.com/kalieye/video.js

basically i added this code to the remainingTimeDisplay function in player.js plus a endCalled variable to avoid multiple calls to the same handler, i have not tested the solution extensively so i don't know the repercussions with other formats etc but it works for my case and might be helpful for others

    rT = Math.floor(this.duration()) - Math.floor(this.currentTime());
    if (rT == 0 && !this.endCalled) {
      this.endCalled = true;
      this.handleTechEnded_();
    }

@mister-ben
Copy link
Contributor

This fixes the issue, but relies on the seeking event. Given #161 was about "not relying on unreliable seek events", is this viable?

master...mister-ben:fix-loop

@gkatsev
Copy link
Member

gkatsev commented Oct 12, 2018

It is possible that we may need your piece of code in VHS @mister-ben. While seeking events are unreliable, I can't think of any other way of handling this specific use-case. Plus, even with #161, we can use middleware for user seeking and seek events for loop and other edge cases that can't be covered by middleware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants