Open LRharlekin opened 4 years ago
@LRharlekin looks like you are using an incorrect property inside of the loadPlaylist
method parameter. On the official documentation, when using the object syntax, you can pass the playlist via the list
property instead of playlist
.
Here is a CodeSanbox demo: https://codesandbox.io/s/crazy-heyrovsky-uxpwc
(There was a similar issue #97 opened by @rmammina in 2017. Unfortunately it was closed shortly after without any answers.)
Note: I am quite new to coding in general, so have mercy :-)
I'm basically trying to build a stripped-down version of this website (but with comedy clips instead of memes) as a personal project to develop my skills.
When the component mounts, the
.loadPlaylist()
loads the playlist (in this case an array of video IDs) correctly. However, when the state changes, the player simply keeps playing the current/initial playlist, even though there are new.customPlaylist
and.playlistIndex
properties attached to the changedselectedComedian
piece of state.What can I do to switch between different
selectedComedian
pieces of state and the attached playlists respectively?Here is the entire component's code: