Youtube video not displaying

Hi!

I’m trying to show a youtube video on my screen, but I’m not able to watch what the preview of the presentation is showing and also is not autoplaying. In xibo/web/display/view appears an exclamation and I don’t know why (ID-61 - moving art).

the code that i’m using is this:
<** iframe width=“1920” height=“1080” src=“YouTube” frameborder=“0” allowfullscreen>
<** /iframe>

The exclamation Mark symbol you are seeing is due to there being items in the Layout that can only be assessed by the Display. What this means is that there is one or more media item in the layout that cannot be previewed on the CMS. An Embedded URL is one of the media items that cannot be previewed on the CMS. You would need to schedule the Layout to a Display to be able to see how it plays back.

In answer to your second issue, I have included a script below that can be used to embed and autoplay YouTube URLs:

  • First open your Layout, select the region that contains the Embedded Item and select the Edit option for that Item. If you have not been using an Embedded media item, you will need to create one.
  • In the HTML to Embed box, enter <div id="player"></div>
  • In the HEAD Content to Embed (including script tags) box, add the below script:

image

You will need to change the videoId entry to the appropriate video ID for your video. In the iframe in your original message, that would be 0YjLf8T0lUs

Many Thanks.

1 Like

Could you write me the script (not with an image format) for not typing it myself? :sweat_smile:
Thanks!

I have written the script below and modified it to include the videoId from your iframe:

<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 onYouTubeIframeAPIReady() {
        player = new YT.Player('player', {
          suggestedQuality: 'hd1080',
          height: '1080',
          width: '1920',
          videoId: '0YjLf8T0lUs',
          events: {
            'onReady': onPlayerReady
          }
        });
      }
      function onPlayerReady(event) {
        event.target.playVideo();
      }
</script>

Many Thanks.

1 Like

Many thanks to you! I’m going to try

Thank you for the code DanBW

I hope its OK i ask a question about this, In the end of this video the youtube suggested videos are shown, is there a way to not show them and just continiue?