Hey there,
Since the last update I noticed that people have problems with audio/video’s in UI’s. I had the same problem in my Loadscreen and this is what I did to solve this.
I always had a background music in my loadingscreen but it didn’t work anymore so what I did is as next. Normally you download music from YouTube or so and add it as
First of all add the YouTube iFrame API script in your head:
<script async src="https://www.youtube.com/iframe_api"></script>
After that the div element below on top of your body:
<div id="div_YouTube" style="display: none;"></div>
I’m using the ‘display:none’ style because I don’t want that players see the video. If you want to show your video, just remove that. You need to add some other styles to fit it.
Now we will add a script which loads the video. Add this on the bottom of your body.
<script>
function onYouTubeIframeAPIReady() {
var player;
player = new YT.Player('div_YouTube', {
videoId: 'Nla5XQGjgOI', // ID from video (https://www.youtube.com/watch?v=VIDEO_ID_HERE)
width: 560,
height: 316,
playerVars: {
'autoplay': 1, // Start automaticly
'controls': 0, // No controls (pause button etc.)
'loop': 1, // Restart after end
},
events: {
'onReady': function (e) {
e.target.setVolume(10); // Volume of video (max 100)
}
}
});
}
</script>
If you did everything right it should work know. Goodluck