0
這將會很長,但我會盡量保持它儘可能短。 我面臨的問題是,我已經在我的網站中嵌入了一個視頻,但是它只是在Firefox中起作用,我希望它能夠在IE和Chrome瀏覽器中工作,作爲頁面的背景。視頻未在IE和Chrome中顯示
的index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jquery/modernizr.custom.26584.js"></script>
<script type="text/javascript" src="jquery/swfobject.js"></script>
<script type="text/javascript" src="js/video_background.min.js"></script>
<video id="video_background" preload="auto" autoplay="true" loop="loop" muted="muted"
volume="0">
<source src="Cosmic cloud_h.264.mp4" type="video/mp4"> </video>
<source src="Cosmic cloud_h.264.flv" type="video/flv"> </video>
<source src="Cosmic cloud_h.264.ogv" type="video/ogv"> </video>
<source src="Cosmic cloud_h.264.webm" type="video/webm"> </video>
<title>title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" type="text/css" href="newcss.css"</head>
<body>
<script src="js/scripts.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$("body").video_background({ format:"16:9",
mp4:"videos/Cosmic cloud_h.264.mp4" ,
flv:"videos/Cosmic cloud_h.264.flv" ,
webm:"videos/Cosmic cloud_h.264.webm" ,
ogv:"videos/Cosmic cloud_h.264.ogv" ,
formatMobile:"16:9",
mp4Mobile:"videos/mobile/Cosmic cloud_h.264.mp4" ,
flvMobile:"videos/mobile/Cosmic cloud_h.264.flv" ,
ogvMobile:"videos/mobile/Cosmic cloud_h.264.ogv" ,
webmMobile:"videos/mobile/Cosmic cloud_h.264.webm" ,
loop:"true",
autoplay:"true",
muted:"false" });
});
</script>
</body>
</html>
太感謝你了。
只需右鍵單擊頁面中的視頻標籤部分。你會看到在IE瀏覽器中播放視頻 – iJade
的選項,它只需要幾秒鐘的時間加載並顯示,以便確認,同樣在Chrome瀏覽器中它只是一個黑屏即使我告訴它玩同樣的東西,任何想法? – user3283349