In some cases you may need to use the “chromeless” player in order to customize the default appearance and to gain control over some of the YouTube player's functions via JS – this is a bit more tricky because you should cue the video in the onYouTubePlayerReady handler for each separate player. As we know, it is not feasible to evaluate the url directly (via server-side expressions) because you will end up with all players playing the same (last) video. This is why I decided to serialize a basic array to store the item indices along with the corresponding urls. This approach is fast and easy enough so everyone can take advantage of it.
Subscribe to be the first to get our expert-written articles and tutorials for developers!