hi, I’m new to xibo so a first thank you to the people who are developing this!
I’m playing around getting my android screens to work, my idea is to show images on different times of the day but at night i want to have a youtube playlist playing.(or all clips from a user)
unfortunately this took me last night 6 hours but without results. Am i missing something simple? Can get a single video to autoplay with this method : Autoplay Embedded Youtube Videos
but a playlist or all user video’s… not working
downloading the clips wil not be an option because i plan on having a changing programme
function onPlayerStateChange(event) {
if (event.data === YT.PlayerState.ENDED) {
player.playVideo();
}
}
this makes the LAST clip of the playlist loop instead of restarting at the first clip, do you have any suggestions how to make the playlist start over again and loop from the first clip?
(The preview in windows screens does loop from first clip but android tablets only loop last clip)
technically argument syntax is for “creating” playlists with an array of videoIds ie what I did use there earlier, but failed to provide good way to loop it from the start, so that would be
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubePlayerAPIReady() {
player = new YT.Player('player', {
height: '1080',
width: '1920',
events: {
'onReady': onPlayerReady,
}
});
}
function onPlayerReady(event) {
event.target.loadPlaylist(['56R3hU-fWZY','O-ZblMfZpuw','l3w2MTXBebg']);
event.target.setLoop(true);
}
</script>
now to use Playlist ID with loadPlaylist(), you’re suppose to use object syntax ie