使いやすいプレイカードを見つけた---ckplayer

5415 ワード

問題のように、まず記録して、プロジェクトの中で簡単に引用して、深く研究したことがありません.
 
コードのインポート:
    
"lessonVideo">
"</span><span style="color:#800000;">text/javascript</span><span style="color:#800000;">"</span> src=<span style="color:#800000;">"</span><span style="color:#800000;">ckplayer/ckplayer.js</span><span style="color:#800000;">" </span><span style="color:#000000;">charset</span>=<span style="color:#800000;">"</span><span style="color:#800000;">utf-8</span><span style="color:#800000;">"</span>> "</span><span style="color:#800000;">text/javascript</span><span style="color:#800000;">"</span>><span style="color:#000000;"> $(function() { </span><span style="color:#0000ff;">var</span> flashvars =<span style="color:#000000;"> { f : </span><span style="color:#800000;">'</span><span style="color:#800000;">${rtmp}</span><span style="color:#800000;">'</span><span style="color:#000000;">,//rtmp c : </span><span style="color:#800080;">0</span><span style="color:#000000;">, b : </span><span style="color:#800080;">1</span><span style="color:#000000;">, p : </span><span style="color:#800000;">'</span><span style="color:#800000;">1</span><span style="color:#800000;">'</span><span style="color:#000000;">, l : </span><span style="color:#800000;">'</span><span style="color:#800000;">image/common/progress.gif</span><span style="color:#800000;">'</span><span style="color:#000000;">,  // div gif t : </span><span style="color:#800000;">'</span><span style="color:#800000;">1</span><span style="color:#800000;">'</span><span style="color:#000000;"> }; </span><span style="color:#0000ff;">var</span> video = [ <span style="color:#800000;">'</span><span style="color:#800000;">${m3u8}</span><span style="color:#800000;">'</span><span style="color:#000000;"> ];        //m3u8 </span><span style="color:#0000ff;">var</span> viewSize =<span style="color:#000000;"> getViewportSize(); </span><span style="color:#0000ff;">var</span> width = <span style="color:#800080;">940</span><span style="color:#000000;">; </span><span style="color:#0000ff;">var</span> height = <span style="color:#800080;">640</span><span style="color:#000000;">; </span><span style="color:#0000ff;">var</span> newDivWidth = Math.min(width, viewSize[<span style="color:#800080;">0</span>] - <span style="color:#800080;">120</span><span style="color:#000000;">); </span><span style="color:#0000ff;">var</span> newDivHeight = Math.min(height, viewSize[<span style="color:#800080;">1</span>] - <span style="color:#800080;">80</span><span style="color:#000000;">); CKobject.embed(</span><span style="color:#800000;">'</span><span style="color:#800000;">ckplayer/ckplayer.swf</span><span style="color:#800000;">'</span>, <span style="color:#800000;">'</span><span style="color:#800000;">lessonVideo</span><span style="color:#800000;">'</span>, <span style="color:#800000;">'</span><span style="color:#800000;">ckplayer_lessonVideo</span><span style="color:#800000;">'</span>, newDivWidth, newDivHeight, <span style="color:#0000ff;">false</span><span style="color:#000000;">, flashvars, video); });</span>      </pre> <p>      function getViewportSize() {<br>       var myWidth = 0, myHeight = 0;<br>       if (typeof (window.innerWidth) == 'number') {<br>       myWidth = window.innerWidth;<br>       myHeight = window.innerHeight;<br>       }<br>       else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {<br>       myWidth = document.documentElement.clientWidth;<br>       myHeight = document.documentElement.clientHeight;<br>       }<br>       else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {<br>       myWidth = document.body.clientWidth;<br>       myHeight = document.body.clientHeight;<br>       }<br>       return [ myWidth, myHeight ];<br>      }</p> <pre>

流れを押すだけで、このdivはオンラインでオンデマンドすることができて、効果は悪くありません
転載先:https://www.cnblogs.com/dayu007/p/7767683.html