0

Just to clarify, I am aware of the YouTube playback control that would be required:

player.pauseVideo():Void

But I would like to know as to how I can utilise this without using an iframe and what JavaScript function is needed, as I have multiple videos to choose from and I want to avoid the videos playing at the same time.

I have inserted videos from YouTube using this code:

<div id="apDiv10"><embed width="200" height="140" id="YT9"
     src="https://www.youtube.com/v/A2p17bdRgqU"></div>

 <div id="apDiv11"><embed width="200" height="140" id="YT10"
      src="https://www.youtube.com/v/meMBFbz_9WE"></div>

Can anyone provide a run down for me and how I can apply this function?

ajp
  • 15
  • 5
  • possible duplicate of [How can I stop a video with Javascript in Youtube?](http://stackoverflow.com/questions/1094397/how-can-i-stop-a-video-with-javascript-in-youtube) –  Mar 28 '15 at 17:22
  • It's different to this - I'm just looking for a JavaScript function which I can apply the player.pauseVideo with using the embed codes that don't use iframe for YouTube videos. – ajp Mar 28 '15 at 17:31
  • It doesn't matter: The code is still the same. `var myPlayer = document.getElementById('YT9'); myPlayer.pauseVideo();` –  Mar 28 '15 at 17:33
  • I see, thank you. Is there any possibility you could you help me with an explicit way of doing this? – ajp Mar 28 '15 at 17:41

0 Answers0