2011-12-22 77 views
0

昨天我發佈了一個關於jQuery YouTube插件的question。有固定的這個問題,我現在注意到,使用這個插件不會加載視頻在Internet Explorer 7或8jquery youtube插件 - IE中的視頻

我做了一些小的調整,把代碼放在jsfiddle

我包括SWFObject,它說我需要在IE中查看,但由於某種原因,它似乎並沒有加載視頻。

有沒有人有想法?

HTML

<div id="player"></div> 
<div class="test"> 
    <p>Thank you for watching the video.</p> 
    <p>Your Voucher Code is: <br /><br /><span>ABCDEFG</span></p> 
</div> 

的JavaScript

jQuery(document).ready(function() { 
    jQuery('.test').hide(); 
}); 

    jQuery("#player").tubeplayer({ 
    width: 600, // the width of the player 
    height: 450, // the height of the player 
    allowFullScreen: "true", // true by default, allow user to go full screen 
    swfobjectURL: "http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js", 
    loadSWFObject: true, // if you include swfobject, set to false 
    initialVideo: "VIDEO_ID", // the video that is loaded into the player 
    preferredQuality: "default",// preferred quality: default, small, medium, large, hd720 
    onPlay: function(id){}, // after the play method is called 
    autoPlay: true, 
    onPause: function(){}, // after the pause method is called 
    onStop: function(){}, // after the player is stopped 
    onSeek: function(time){}, // after the video has been seeked to a defined point 
    onMute: function(){}, // after the player is muted 
    onUnMute: function(){}, // after the player is unmuted 
    onPlayerEnded: function(){$('#player').hide(); $('.test').show(); }}); 
+0

隨意downvote,但我要評論:)簡單地說,因爲IE是軟件最大的垃圾不斷製作! – ZolaKt 2011-12-22 12:08:27

+0

我意識到這一點,但我的95%的用戶使用IE(6-9)。我不能簡單地忽略這一點。 – terrid25 2011-12-22 12:33:56

+0

是的,我知道。在那裏幾次。如果這種垃圾從來沒有存在過,那將會變得容易得多:)無論如何,對於視頻和跨瀏覽器兼容性,請查看http://videojs.com/試用它只是爲了測試,我非常滿意。我知道這不是你想要的,但也許它有助於某種方式 – ZolaKt 2011-12-22 13:50:21

回答

0

好了,我包括SWFObject 2.1並重新安裝Flash播放器。

這現在工作在IE7,IE8和IE9

感謝大家的幫助:)