2011-04-27 5 views
0

bitsontherun.com을 사용하여 동영상을 호스팅하고 스트리밍합니다. 그것은 JW 플레이어의 최신 버전을 사용하지만, 플레이어는 bitsontherun에 의해 처리됩니다. 내 제품 이미지 갤러리에 shadowbox.js도 사용합니다. 내 제품 비디오를 갤러리에 통합하려고합니다. 그러나, 나는 bitsontherun에서 shadowbox 비디오하는 방법을 알아낼 수 없습니다. 일반적으로 나는이 같은 스크립트 태그를 사용하여 페이지에 그 비디오를 포함 : 일반적으로 썸네일 이미지와 링크를 사용 shadowbox.js에서 bitsontherun.com 비디오를 실행할 수 있습니까?

<script src="http://content.bitsontherun.com/players/ThWcjaxZ-qLFOERCo.js" type="text/javascript"></script> 

Shadowbox.js

가 라이트 및 관련 플레이어를 실행합니다. 누구든지이 아이디어를 만드는 방법을 알고 있습니까?

답변

1

예. 다음은 기본 구현입니다. 당신이 script 요소가 div에 링크를 감싸는 경우

<!DOCTYPE HTML> 
<html> 
    <head> 
     <link rel="stylesheet" type="text/css" href="shadowbox-3.0.3/shadowbox.css"> 
     <style> 
      .botrplayer {display: none} 
     </style> 
     <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> 
     <script type="text/javascript" src="shadowbox-3.0.3/shadowbox.js"></script> 
     <script type="text/javascript"> 
      Shadowbox.init({ 
       skipSetup: true 
      }); 
      $(document).ready(function(){ 
       Shadowbox.setup($('.sbox'));//set up links with class of sbox 
       $('a.sbox').live('click',function(event){ 
        Shadowbox.open({ 
         content: $(this).siblings('.botrplayer').html(), 
         player:  'html', 
         title:  "Welcome", 
         height:  280, 
         width:  490 
        }); 
        //Stops loading link 
        event.preventDefault(); 

       }); 
      }); 
     </script> 
     <title>bitsontherun shadowbox</title> 
    </head> 
    <body> 
     <p>The content of the document......</p> 
     <div> 
      <a href="#" class="sbox">Open bitsonthe run video</a> 
      <script type="text/javascript" src="http://content.bitsontherun.com/players/qgGMXVzB-Zdb9K7JT.js"></script> 
     </div> 
    </body> 
</html> 

것은, 당신은 그들 모두에 대해이 코드를 재사용 할 수 있습니다.

여기 호스팅 : 당신은 또한 비디오의 SWF 버전을 사용할 수 http://sandbox.jamesfishwick.com/bitsontherun/index.html

관련 문제