This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
2 Youtube Videos auf einer Seite einbinden
#1
Photo 
Hallo zusammen,

ich möchte auf einer Wordpress Seite 2 Youtube Videos über javascript einbinden. Am Ende erhalte ich nur eins. Woran liegt das bzw. was muss ich ändern? Entschuldigt bin noch Anfänger!

----------------------------------------------
1. Video
----------------------------------------------

<div class="responsive-container"><div id="player"></div></div> <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', {
          videoId: 'S4cZjaXmuzE',
        });
      }
      function setCurrentTime(slideNum) {
        var object = [ 0, 133, 193 ];
        player.seekTo(object[slideNum]);
      }</script>


----------------------------------------------
2. Video
----------------------------------------------
<div class="responsive-container"><div id="player"></div></div> <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', {
          videoId: 't1UlWeeZE6A', 
        });
      }
      function setCurrentTime(slideNum) {
        var object = [ 0, 133, 193 ];
        player.seekTo(object[slideNum]);
      }</script>
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste