2014-10-03 232 views
0

更新:在本地當我在瀏覽器中預覽我的作品時。我的文件存儲在我們的一臺服務器上的相同文件夾結構中。背景視頻不會播放一次,只在本地播放

更新:你的意思是哪個jpeg引用?這是我嘗試你的方式嗎?

更新:此頁面無法加載評論或答案,所以我會在這裏發佈我的答案。

更新:控制檯確實表示文件丟失,但它們不是。整個網站文件已經上傳了好幾次。如果需要,我可以在服務器中提供該文件夾的屏幕截圖。

enter image description here

我插入我的索引頁面中的背景視頻,但它不播放一次該網站是活的。我相信它使用圖像後備。它在本地運行良好,但絕對網址存在問題。我從github上下載了這個問題的更新,但是我下載的包是一個新版本。測試鏈接在github鏈接下面。

https://github.com/VodkaBears/Vide/archive/0.1.1.zip#

http://bit.ly/1xLpFiu

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head lang="en"> 
<meta charset="UTF-8"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
<meta http-equiv="Pragma" content="no_cache" /> 
<title>M&amp;T Printing Group</title> 
<link rel=」author」 href=」https://plus.google.com/+MTPrintingGroupKitchener「/> 
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css' /> 
<link href='http://fonts.googleapis.com/css?family=Bitter' rel='stylesheet' type='text/css' /> 
<link rel="stylesheet" type="text/css" href="css/style.css" /> 
<!--[if IE 7]> 
    <link rel="stylesheet" type="text/css" href="css/ie7.css"> 
<![endif]--> 
<link rel="stylesheet" type="text/css" href="css/content.css" /> 
<link rel="stylesheet" type="text/css" href="css/font.css" /> 
<link rel="stylesheet" type="text/css" href="QuotesRotator/css/default.css" /> 
<link rel="stylesheet" type="text/css" href="QuotesRotator/css/component.css" /> 
<script src="QuotesRotator/js/modernizr.custom.js" type="text/javascript"></script> 
<!-- github.com/scottjehl/Respond - for IE 8, 7.... --> 
<script src="Respond-master/dest/respond.min.js" type="text/javascript"></script> 

<!--<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> 
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> 
<script type="text/javascript"> 

$(document).ready(function(){ 
    $(".subnav").prev().mouseover(function(){ 
     var sub_menu_shift = parseInt($(this).next().css("height")) + 100; 
     $(this).next().css({'position':'relative','bottom':sub_menu_shift}); 
    }); 
    }); 

</script>--> 

    <style> 
     html, body { 
      margin: 0; 
      width: 100%; 
      height: 100%; 
     } 
    </style> 

</head> 

<body data-vide-bg="Vide-0.1.2/examples/video/videoMain"> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
<script src="Vide-0.1.2/src/jquery.vide.js"></script> 
<script>window.jQuery || document.write('<script src="Vide-0.1.2/libs/jquery/jquery-1.11.1.min.js"><\/script>')</script> 
<script src="Vide-0.1.2/src/jquery.vide.js"></script> 
<script> 
// $(document).ready(function() { 
//  $(document.body).vide("Vide-0.1.2/examples/video/videoMain"); // Non declarative initialization 
// 
//  var instance = $(document.body).data("vide"); // Get instance 
//  var video = instance.getVideoObject(); // Get video object 
//  instance.destroy(); // Destroy instance 
// }); 
</script> 

<div id="indexBG"> 

<div id="colour-bar-black"></div> <!-- colour-bar-black --> 

<div id="nav-wrap"> 

<ul> 
    <li id="link-one" class="orange"> 
    <a href="printing.html" class="parent-one-link" title="Printing"><span>Printing</span></a> 

    <div class="subnav" id="subnav"> 
      <ul> 
      <li><a href="_printing/digital-printing.html" title="Digital Printing">Digital Printing</a></li> 
      <li><a href="_printing/offset-printing.html" title="Offset Printing">Offset Printing</a></li> 
      <li><a href="_printing/business-cards&amp;stationery.html" title="Business Cards &amp; Stationery">Business Cards &amp; Stationery</a></li> 
      <li><a href="_printing/manuals-reports&amp;catalogues.html" title="Manuals, Reports &amp; Catalogues">Manuals, Reports &amp; Catalogues</a></li> 
      <li><a href="_printing/bindery-services.html" title="Bindery Services">Bindery Services</a></li> 
      <li><a href="_printing/canada-post.html" title="Canada Post">Canada Post</a></li> 
      <li><a href="_printing/graphic-design-typesetting.html" title="Graphic Design &amp; Typesetting">Graphic Design &amp; Typesetting</a></li> 
      </ul> 
     </div><!-- /.subnav --> 

    </li> 

    <li class="red"><a href="promotional-products.html" title="Promotional Products"><span class="doubleLine">Promotional Products</span></a> 

    <div class="subnav"> 
      <ul> 
      <li><a href="_promotional-products/awards-mounting.html" title="Awards &amp; Mounting">Awards &amp; Mounting</a></li> 
      <li><a href="_promotional-products/binders.html" title="Binders">Binders</a></li> 
      <li><a href="_promotional-products/clothing-apparel.html" title="Clothing &amp; Apparel">Clothing &amp; Apparel</a></li> 
      <li><a href="_promotional-products/bags.html" title="Bags">Bags</a></li> 
      <li><a href="_promotional-products/drinkware.html" title="Drinkware">Drinkware</a></li> 
      <li><a href="_promotional-products/lanyards.html" title="Lanyards">Lanyards</a></li> 
      <li><a href="_promotional-products/magnets.html" title="Magnets">Magnets</a></li> 
      <li><a href="_promotional-products/pens-writing-instruments.html" title="Pens &amp; Writing Instruments">Pens &amp; Writing Instruments</a></li> 
      <li><a href="_promotional-products/presentation-folders.html" title="Presentation Folders">Presentation Folders</a></li> 
      <li><a href="_promotional-products/usb.html" title="USB Flash Drives">USB Flash Drives</a></li> 
      <li><a href="_promotional-products/umbrellas.html" title="Umbrellas">Umbrellas</a></li> 
      </ul> 
     </div><!-- /.subnav --> 

    </li> 

    <li class="pink"><a href="banners-signage.html" title="Banners &amp; Signage"><span class="doubleLine">Banners &amp; Signage</span></a> 

    <div class="subnav"> 
      <ul> 
      <li><a href="_banners-signage/drafting-cad-services.html" title="Drafting &amp; CAD services">Drafting &amp; CAD services</a></li> 
      <li><a href="_banners-signage/coroplast&amp;foamcore.html" title="Coroplast &amp; FoamCore">Coroplast &amp; FoamCore</a></li> 
      <li><a href="_banners-signage/retractable-banners.html" title="Retractable Banners">Retractable Banners</a></li> 
      <li><a href="_banners-signage/posters&amp;banners.html" title="Posters &amp; Banners">Posters &amp; Banners</a></li> 
      <li><a href="_banners-signage/wraps&amp;pvc.html" title="Wraps &amp; PVC">Wraps &amp; PVC</a></li> 
      <li><a href="_banners-signage/displays&amp;canvas.html" title="Displays &amp; Canvas">Displays &amp; Canvas</a></li> 
      </ul> 
     </div><!-- /.subnav --> 

    </li> 

    <li class="purple"><a href="pool.html" title="POOL"><span>POOL</span></a></li> 

    <li class="blue"><a href="http://www.volumesdirect.com/" title="Volumes"><span>Volumes</span></a></li> 

    <li class="green"><a href="contact.html" title="Contact"><span>Contact</span></a> 

    <div class="subnav"> 
      <ul> 
      <li><a href="locations.html" title="Locations">Locations</a></li> 
      <li><a href="media.html" title="Media">Media</a></li> 
      <li><a href="https://digitalink2.mtprint.com/exchweb/bin/auth/owalogon.asp?url=https://digitalink2.mtprint.com/exchange&reason=0&replaceCurrent=1" title="Digital Link">Digital Link</a></li> 
      <li><a href="ftp://ftp.mtprint.com/" title="FTP site">FTP site</a></li> 
      <li><a href="https://secure.mtprint.com/pool/CustSignIn.aspx" title="Client Login">Client Login</a></li> 
      <li><a href="mtprint/QuoteForm.aspx" title="Estimate Request">Estimate Request</a></li> 
      <li><a href="submit/submit_file.aspx" title="Submit A File">Submit A File</a></li> 
      <li><a href="_contact/recognition.html" title="Recognition">Recognition</a></li> 
      <li><a href="_contact/graphics-factory.html" title="Graphics Factory">Graphics Factory</a></li> 
      <li><a href="_contact/careers.html" title="Careers">Careers</a></li> 
      </ul> 
     </div><!-- /.subnav --> 

    </li> 

    <li class="yellow-facebook"><a href="https://www.facebook.com/mtprint/" title="Facebook"><span></span></a></li> 

</ul> 

</div> <!-- nav-wrap --> 

<div id="logo"><a href="index.html"><img src="images/logo-main.png" alt="M&amp;T Printing Group" title="M&amp;T Printing Group" /></a></div> <!-- logo --> 

<!-- used for mobile --> 

<div id="logo-mobile"><a href="index.html"><img src="images/M&T-Printing-Group-Logo-moble.jpg" alt="M&amp;T Printing Group" title="M&amp;T Printing Group" /></a></div> <!-- logo-mobile --> 

<h1>&ldquo;Your Partners In Print&rdquo;</h1> 

<div id="footer">   

<ul class="footer-left"> 
    <li><a href="index.html">M&amp;T Printing Group</a> - &copy; 2014</li> 
</ul> 

<ul class="footer-right"> 
<li><a href="https://secure.mtprint.com/pool/CustSignIn.aspx" title="Client Login">Client Login</a></li> 
<li><a href="locations.html" title="Locations">Locations</a></li> 
<li><a href="pool.html" title="Pool">Pool</a></li> 
</ul> 

</div> <!-- footer --> 

</div> <!-- indexBG --> 

</body> 
</html> 
+0

請檢查控制檯它說'無法加載資源:服務器響應狀態爲404(Not Found)' – 2014-10-03 17:22:05

回答

0

我只想做這樣的事情,使用jquery。您可以將videoURL發送到您喜歡的任何位置,並且它會正確加載。我在過去爲幾個網站完成了這項工作,它的工作非常好。下面只是html和JQUERY。你的問題在我看來似乎是你有視頻存儲。你說它「正常」工作正常嗎?你在哪裏託管你的網頁?您的視頻應存儲在同一個場地。

<section class="content-section video-section"> 
    <div class="pattern-overlay"> 
    <a id="bgndVideo" class="player" data-property="{videoURL:'https://www.youtube.com/watch?v=sd4bqmP_460',containment:'', quality:'large', autoPlay:true, mute:true, opacity:1}">bg</a> 
    </div> 
</section> 


$(document).ready(function() { 

    $(".player").mb_YTPlayer(); 

}); 

我看到您添加的編輯。刪除JPEG或參考MP4文件。

- 可以編輯您的評論,但它是我唯一可以回覆的方式。哪種jpeg參考指的是你的意思?

+0

$(document.body).vide(「Vide-0.1.2/examples/video/videoMain .MP4" ) – 2014-10-03 17:55:17