☐ Problems with the async handling in main `useEffect`
In this example, the random number indicates the "session" for the useEffect. Session "0.78" ran quite some time ago, and now we are in session "0.02" because the source has changed. In theory, the cleanup for "0.78" will be called and we should abort stuff before "0.02" even ran, but the few promises that were spun continued to run, so we are seeing some bad overlap here.
☐ Dependencies aren't maintained correctly
While it's true that most of these value change together with another variable (e.g `uri`), not all of them are and it's always risky to assume so. Also risky to disable lint without explainer comment, because the next person that adds something to the effect will simply leave the dep array un-updated.
![image](https://user-images.githubusercontent.com/64950861/229277119-2ff3ec23-c4a0-4694-844d-1e550aaecfb4.png)
![image](https://user-images.githubusercontent.com/64950861/229277024-3800f707-74c6-4c78-980a-631f62ba1626.png)
☐ Our ABR customization to pick the "first found quality" needs a refresh
The way we implemented it is by copying the function from `http-streaming` and make the edits on our side on runtime. It still works with the latest `http-streaming` since it's just a query function, but it seems like there are some updates in the latest version.
Options:
1. Just grab the latest version and repeat the changes.
2. Figure out a less surgical way to get the desired behavior.
3. Don't do that behavior anymore (do we still need 1817?)
☐ videojs being used before plugins are ready
The videojs initialization is async, so the returned handle is not supposed to be used immediately.
https://videojs.com/guides/setup/#player-readiness
The plugin initialization is correctly placed in the ready-callback, while a few other "events" and src-load are placed synchronously.
This means we are loading the source before plugins are initialized.
That may explain why chromecast sometimes doesn't work for me and require a refresh.
I'm thinking we are just lucky, or the second playback onwards will "correct" things since we retain the instance.
☐ Problems with the async handling in main `useEffect`
In this example, the random number indicates the "session" for the useEffect. Session "0.78" ran quite some time ago, and now we are in session "0.02" because the source has changed. In theory, the cleanup for "0.78" will be called and we should abort stuff before "0.02" even ran, but the few promises that were spun continued to run, so we are seeing some bad overlap here.☐ Dependencies aren't maintained correctly
While it's true that most of these value change together with another variable (e.g `uri`), not all of them are and it's always risky to assume so. Also risky to disable lint without explainer comment, because the next person that adds something to the effect will simply leave the dep array un-updated. ![image](https://user-images.githubusercontent.com/64950861/229277119-2ff3ec23-c4a0-4694-844d-1e550aaecfb4.png) ![image](https://user-images.githubusercontent.com/64950861/229277024-3800f707-74c6-4c78-980a-631f62ba1626.png)☐ Our ABR customization to pick the "first found quality" needs a refresh
The way we implemented it is by copying the function from `http-streaming` and make the edits on our side on runtime. It still works with the latest `http-streaming` since it's just a query function, but it seems like there are some updates in the latest version. Options: 1. Just grab the latest version and repeat the changes. 2. Figure out a less surgical way to get the desired behavior. 3. Don't do that behavior anymore (do we still need 1817?)