flowplayer / flowplayer-mpegdash

MIT License
8 stars 13 forks source link

Fix bug causing video to play if it is stopped/paused/unloaded in finished state #11

Closed tiksa closed 8 years ago

tiksa commented 8 years ago

If I let a DASH video to get into the "finished" state and then use the flowplayer API to unload()/pause()/stop() (I tried those), the player starts to play the video from the beginning.

The execution always seemed to somehow go to line 139 where videoTag is asked to play(). videoTag.currentTime seemed to return 0, which is a falsy value. I'm not sure if this is intended, so I added ~ in front of it to make currentTime 0 truthy. This fixed the bug.

My setup: Flowplayer 6.0.5 Chrome 48 Ubuntu 14.04 Tried with various MP4 videos.

I also tried if I can reproduce this on your DASH demo page: http://demos.flowplayer.org/api/dash.html but there was a bug that it provided HLS video instead of DASH (someone already confirmed this at Flowplayer forum).

phloxic commented 8 years ago

@tiksa - thanks for spotting.

phloxic commented 8 years ago

@tiksa - I'm currently investigating whether the replay workaround can be removed now.

tiksa commented 8 years ago

Ok, nice to hear. Currently I'm using my quick fix but if you end up with a more robust solution, I'm happy to switch to the "official" version.

Thanks for the quick response.

phloxic commented 8 years ago

@tiksa - https://github.com/flowplayer/flowplayer-mpegdash/commit/abb0c592f40f291935f271937d86862ead236d87 - unless we discover a problem with the removal of the workaround, this should be the cleaner solution.

phloxic commented 8 years ago

@tiksa - this can be closed afaics.