Closed LIONisaQT closed 2 years ago
What is happening is that the v param is not getting cleared properly between playlist switching. |
Action | Expected v |
Actual v |
Expected list |
Actual list |
---|---|---|---|---|---|
Click on kpop-03 on fresh load | WkgfVB_gA0Q | WkgfVB_gA0Q | PL5FeYIiqkJGrn... | PL5FeYIiqkJGrn... | |
Click on kpop-04 | C48Zy4OvZ2o | WkgfVB_gA0Q | PL5FeYIiqkJGq5yBy2Mmx... | PL5FeYIiqkJGq5yBy2Mmx... | |
Click on kpop-04 again | C48Zy4OvZ2o | C48Zy4OvZ2o | PL5FeYIiqkJGq5yBy2Mmx... | PL5FeYIiqkJGq5yBy2Mmx... |
Notice that the playlist is correctly switching on click, but video focus for some reason does not change until the playlist is clicked again for some reason.
Resolved Case 1 with help from this SO answer. For reference, clearVideo()
has been deprecated, so this is the next best solution.
Or in some cases, is using the outright incorrect playlist?
Case 1 (using previous playlist)
Switch between lofi-06 (3 AM Coding Session) and lofi-07 (Cute and Happy Lofi Music). It looks like the current playlist value is not updated in time, so the player users the previous selection (this is might be an issue with using React's
setState()
?Check
Case 2 (getting stuck on playlist)
Switch between lofi-01 (lofi hip hop radio) and lofi-06 (3 AM Coding Session). It seems that there are no issues switching from
user_uploads
(single videos/live streams) toplaylist
type links, but there are issues with switching from a playlist to a single video/live stream. It seems the IFrame is missing something that allows it to switch back to single videos after being in playlist mode.Possible explanation and solution
Utility.js contains functions
playPlaylist()
andcuePlaylist()
, which works with going from single video to single video, but once the IFrame is in playlist mode, it requires actually usingloadVideoById()
orloadVideoByUrl()
.