epiclabs-io / epic-video-comparator

Javascript library which implements a video comparator component: two overlaped and synchronized video players each one playing an independent source.
https://epiclabs-io.github.io/epic-video-comparator-demo/
MIT License
83 stars 8 forks source link

Safari errors #9

Open nirmaoz opened 5 years ago

nirmaoz commented 5 years ago

Hi guys, The video comparator is really nice but there are errors when using safari:

  1. when trying to play some movies such as https://www.w3schools.com/html/mov_bbb.mp4 Metadata labels of each video are empty and in the console: TypeError: null is not an object (evaluating 'this.htmlPlayer.videoTracks.item(this.htmlPlayer.videoTracks.selectedIndex).label')

  2. Also, in the demo page (https://epiclabs-io.github.io/epic-video-comparator-demo/): while the original movie (https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.mpd) starts playing immediately in chrome, it loads forever in safari.

adripanico commented 5 years ago

Hi guys, The video comparator is really nice but there are errors when using safari:

Thanks! It is difficult to me to test it in Safari, but let's try.

1. when trying to play some movies such as
   https://www.w3schools.com/html/mov_bbb.mp4
   Metadata labels of each video are empty and in the console:
   TypeError: null is not an object (evaluating 'this.htmlPlayer.videoTracks.item(this.htmlPlayer.videoTracks.selectedIndex).label')

In this case, the problem comes from the underlying epic-video-player and this seems to be a problem with the HTML5 video player.

For the video source you provided, when I inspect the videoTracks property I get undefined both in Chrome and Firefox. I have added extra checks in epic-video-player in order to avoid the error raising up in the future but I will also try to check why this is happening only in Safari.

2. Also, in the demo page (https://epiclabs-io.github.io/epic-video-comparator-demo/):
   while the original movie (https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.mpd) starts playing immediately in chrome, it loads forever in safari.

Again, this seems to be related with epic-video-player. I will soon release a new version on this library and then I will upgrade epic-video-comparator to the latest one, which includes Dashjs v3.0. Let's see whether this new library ends up with the problems in Safari.