解決網頁中插入視頻

來源:互聯網
上載者:User
要在網頁中插播視頻,網上的那些千篇一律的copy,都不管用。文庫上說的試了好多都不行,都不具體。如果只播放簡單的swf視頻(就是進入網頁就播放,沒有各種操作按鈕的 )  那個可以用dreamware 工具直接實現,     插入 swf 媒體  然後就ok了 那樣使用者體驗就差了       弄了好久終於發現一個很不錯的東西了  GDD FLVPlayer  可以播放flv mp4  檔案  可以去官網查看詳細資料         配置過程:                     下載必須的js檔案: http://115.com/file/ankjfgbr#jquery.js                                                     http://115.com/file/dp1i5de1#flash.js                      寫你要播放視頻的那個html檔案中加入這兩個檔案              視頻代碼  
<div id="myplayer"><script type="text/javascript">    $(document).ready(function(){        $('#myplayer').flash({            'src':'http://www.gdd.ro/gdd/flvplayer/gddflvplayer.swf',            'width':'640',            'height':'480',            'allowfullscreen':'true',            'allowscriptaccess':'always',            'wmode':'transparent',            'flashvars': {                'vdo':'這裡寫視頻檔案地址',                'sound':'50',                'splashscreen':'http://www.xianqu8.com/uploads/allimg/090514/01134112.jpg(這裡是開始是螢幕圖片)',                'autoplay':'false','clickTAG':'',                'endclipaction':'javascript:endclip();'            }        });    });</script></div><!-- player --><script>// endclip function called when clip endsfunction endclip(){$('#myplayer').flash({            'src':'http://www.gdd.ro/gdd/flvplayer/gddflvplayer.swf',            'width':'640',            'height':'480',            'wmode':'transparent',            'flashvars': {                'vdo':'AvatarHD.mp4',                'autoplay':'true',            }});}</script>

效果這是一個demo  http://115.com/file/beiw24wv#gddflvplayer-v3.6.rar參考:http://www.woiweb.net/21-free-video-players-for-your-website-and-blogs.html         http://www.gdd.ro/free-flash-flv-player             

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.