English 中文(简体)
浏览YouTube视频
原标题:Stopping iframe YouTube videos

我有一个嵌入的YouTube视频。

<iframe width="490" height="279" src="http://www.youtube.com/embed/X7ab_dVhkWk?version=3&enablejsapi=1" frameborder="0" allowfullscreen></iframe>

封面的超文本:

<embed width="100%" height="100%" id="video-player-flash" type="application/x-shockwave-flash" src="http://s.ytimg.com/yt/swfbin/watch_as3-vflCBBX6J.swf" allowscriptaccess="always" allowfullscreen="true" bgcolor="#000000" flashvars="el=embedded&amp;fexp=904544%2C909703%2C920701&amp;is_html5_mobile_device=false&amp;allow_ratings=1&amp;allow_embed=1&amp;tabsb=1&amp;sendtmp=1&amp;hl=en_US&amp;eurl=http%3A%2F%2Fdev.springcorp.co.uk%2Fhistoricscotland%2Fstirling%2Ffacebook-april2012%2F&amp;iurl=http%3A%2F%2Fi2.ytimg.com%2Fvi%2Fai55pL37saU%2Fhqdefault.jpg&amp;view_count=117&amp;title=Regent%20Arran%20Stirling%20Castle%20TV%20ad%202012&amp;avg_rating=0&amp;video_id=ai55pL37saU&amp;length_seconds=31&amp;iurlmaxres=http%3A%2F%2Fi2.ytimg.com%2Fvi%2Fai55pL37saU%2Fmaxresdefault.jpg&amp;enablejsapi=1&amp;sk=UX8fbMJpKT-VH3IVkWhtN7gCKU1r3TSzC&amp;rel=1&amp;playlist_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fplaylist_module-vflfGS7wE.swf&amp;iurlsd=http%3A%2F%2Fi2.ytimg.com%2Fvi%2Fai55pL37saU%2Fsddefault.jpg&amp;jsapicallback=ytPlayerOnYouTubePlayerReady&amp;playerapiid=player1&amp;framer=http%3A%2F%2Fdev.springcorp.co.uk%2Fhistoricscotland%2Fstirling%2Ffacebook-april2012%2F">

我怎么能用贾瓦文阻止这一录像?

问题回答

最后,我不得不用复印件进行掩埋,因此我提到了这片人。 (xxxx 是录像带的 you)

<div id="player"></div>
<div id="player2"></div>
<div id="player3"></div>

<script>
    //Load player api asynchronously.
    var tag = document.createElement( script );
    tag.src = "http://www.youtube.com/player_api";
    var firstScriptTag = document.getElementsByTagName( script )[0];
    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
   var done = false;
    var player;
    var player2;
   var player3;
    function onYouTubePlayerAPIReady() {
        player = new YT.Player( player , {
          height:  279 ,
          width:  490 ,
          videoId:  xxxxxxxx ,

        });

       player2 = new YT.Player( player2 , {
          height:  279 ,
          width:  490 ,
          videoId:  xxxxxxx ,

        });

        player3 = new YT.Player( player3 , {
          height:  279 ,
          width:  490 ,
          videoId:  xxxxxx ,

       });
    }

    function stopVideo() {
    player.stopVideo();

    }





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签