silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

setSource being called multiple times when using latest version and videojs-playlist #161

Closed xtr33me closed 1 year ago

xtr33me commented 1 year ago

I am working on a chromecast sender receiver setup with HLS streams. I'm managing these visually using videojs-playlist and videojs-playlist-ui. I will provide the version down below. A strange issue I was noticing was when I was playing the stream without casting, everything was working as expected, however when I would go to cast, it would play the stream I was currently playing just fine, however if I went to select another video source in the playlist, it would play the selected item index + 1. After debugging the source, it seems to be that on selection of the source in the playlist, setSource in ChromecastTech.js gets called on the proper stream, but then it got about calling set source again on the next stream in the playlist as well which essentially overwrites the prior load and just finishes with the load of the selectedIndex+1.

I am trying to get a requested POC completed, so I havent had much time to look into that much further. IF I get a chance I will do so. That all said, when I downgraded the version from 1.4.1 to an older version of 1.2.0 this problem is no longer being seen and the casting is working fine.

I am looking into another issue with this version and my receiver app ID not being used and rather the default, but I am not 100% sure that isn't something on my part. I wanted to get this issue opened and as stated above, should I get a bit of time after this task to look into things deeper I will do so.

This is a react 18.2 project. I originally downgraded from the latest version of videojs to 7.6.6 to see if the issue still occurred but it seems to happen with both.

Current dependencies: "@silvermine/videojs-chromecast": "1.4.1" //1.2.0 does not have this same problem "videojs-playlist": "4.3.0" "video.js": "7.6.6", "videojs-playlist-ui": "3.5.2"

xtr33me commented 1 year ago

Issue was with package videojs-playlist-ui and not here.