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

Replay is not working #201

Closed
forbesjo opened this issue Aug 23, 2018 · 3 comments · Fixed by #204
Closed

Replay is not working #201

forbesjo opened this issue Aug 23, 2018 · 3 comments · Fixed by #204
Labels

Comments

@forbesjo
Copy link
Contributor

Description

The replay functionality seems broken, when attempting to replay the player freezes and spins.

Sources

This can be reproduced with bipbop in the demo page

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Play and seek to the end of the video
  2. Click the replay button to restart the video

Results

Expected

The player should replay the video from the start

Error output

If there are any errors in the console, from the player, or anywhere else please include them here: no errors
You will notice that the buffered range is still the end of the video

Additional Information

Please include any additional information necessary here. Including the following:

videojs-http-streaming version

what version of videojs-http-streaming does this occur with?
videojs-http-streaming 1.2.4

videojs version

what version of videojs does this occur with?
video.js 7.1.0

Browsers

what browsers are affected? please include browser and version for each
*Only tried Chrome

Platforms

what platforms are affected? please include operating system and version or device and version for each

  • Only tried Mac

Other Plugins

are any other videojs plugins being used on the page? If so, please list them with version below.

  • none

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

  • none

History:

[
  ["WARN:", "A plugin named \"reloadSourceOnError\" already exists. You may want to avoid re-registering plugins!"],
  ["DEBUG:", "VHS:", "PlaybackWatcher >", "initialize"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "playlist update [null => 2]"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1800.0118999999966]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "playlist update [2 => 2]"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1800.0118999999966]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "live window shift [0]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "INIT -> READY"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "created SourceBuffer"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [time: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SyncController >", "time mapping for timeline 0: [time: 0] [mapping: -10]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [0] of [0, 181] from playlist [2] [0 => 9.943277777777777] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [0 => 9.976643]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1799.9785777777743]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [1] of [0, 181] from playlist [2] [9.976644444444446 => 19.919922222222223] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [0 => 19.953288]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1800.0119222222188]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [2] of [0, 181] from playlist [2] [19.95328888888889 => 29.896566666666665] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [0 => 29.907255]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1799.9785666666633]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [3] of [0, 181] from playlist [2] [29.92993333333333 => 39.87321111111111] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [0 => 39.891835]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1800.0119111111078]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [4] of [0, 181] from playlist [2] [39.90657777777778 => 49.84984444444444] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [0 => 49.876416]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "remove [0 => 1800.0118999999966]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered []"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [time: 1786.375446] chosen with strategy [Segment]: [time:39.90657777777778, segmentIndex:4]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "remove [0 => 1756.375446]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered []"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [178] of [0, 181] from playlist [2] [1775.8425111111112 => 1785.7857888888889] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [1775.862131 => 1785.800271]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1799.944188888889]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "remove [0 => 1756.375446]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [1775.862131 => 1785.800271]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [179] of [0, 181] from playlist [2] [1785.8191555555557 => 1795.7624333333333] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [1775.862131 => 1795.784806]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1799.9775333333332]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "READY -> WAITING"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "remove [0 => 1756.375446]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [1775.862131 => 1795.784806]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "WAITING -> APPENDING"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "appending [180] of [0, 181] from playlist [2] [1795.7958 => 1799.9666333333332] in timeline [0]"],
  ["DEBUG:", "VHS:", "SourceUpdater[main][video/mp2t; codecs=\"avc1.4d401f, mp4a.40.2\"] >", "buffered [1775.862131 => 1799.999999]"],
  ["DEBUG:", "VHS:", "SegmentLoader[main] >", "APPENDING -> READY"],
  ["DEBUG:", "VHS:", "SyncController >", "syncPoint for [segmentIndex: 0] chosen with strategy [VOD]: [time:0, segmentIndex:0]"],
  ["DEBUG:", "VHS:", "MPC >", "seekable updated [0 => 1799.9666333333332]"]
]
@forbesjo forbesjo added the bug label Aug 23, 2018
@forbesjo
Copy link
Contributor Author

forbesjo commented Aug 23, 2018

This issue started in version 1.2.2, confirmed that #161 introduced this

@alex-barstow
Copy link
Contributor

alex-barstow commented Aug 23, 2018

Looks like seekTo isn't getting called, and middleware doesn't catch the seek back to 0 on replay, so nothing resets the segment loaders.

@forbesjo
Copy link
Contributor Author

When writing a fix for this remember to add a replay e2e test

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