nkoehler / mat-video

:tv: mat-video is an Angular 8/9+ video player using Material!
https://nkoehler.github.io/mat-video/
MIT License
91 stars 47 forks source link

Fix Safari stuck on image bug #56

Closed thibserot closed 4 years ago

thibserot commented 4 years ago

The way the player is designed there is a sort of circular dependency when we read the time and then update the player. To break this loop we make sure to update currentTime only if a new value is present. This works well on all browser except safari that get value almost identical. The delta is sub millisecond.

This PR fix the issue mentionned https://github.com/nkoehler/mat-video/issues/37 by only updating the time if we moved by more than a tenth of a millisecond

nkoehler commented 4 years ago

I think this fix will suffice for now, but if there are any other suggestions on how to improve this I would welcome them.

Thank you for the contribution.