zoukankan      html  css  js  c++  java
  • jw player学习笔记三---发布到其它网站

    一、通过官网发布向导

    登陆 http://www.longtailvideo.com,注册一个账号,进入你的用户管理中心,如下图


    然后按提示,一步步操作,就会得到js代码了。


    二、自己服务器发布


    <script src="http://xx.com/jwplayer/js/jwplayer.js" type="text/javascript"></script>
    <script src="http://xx.com/jwplayer/js/jwpsrv.js" type="text/javascript"></script>


    <div id="container"></div>

    <script type="text/javascript">
    		jwplayer("container").setup({
    			html5player:"http://xx.com/jwplayer/js/jwplayer.html5.js",
    			flashplayer:"http://x.com/jwplayer/js/jwplayer.flash.swf",
    			file: "http://xxp.com/jwplayer/uploads/1.mp4",
    			image: "http://xx.com/jwplayer/uploads/snapshot.jpg",
    			title:"来自PANDA的视频"
    		});
        </script>


    三、两种发布方式的区别:

    官网向导方式,我们会得到

    <script src="http://jwpsrv.com/library/dO5_Ul5aEeO5FBIxOQfUww.js"></script>


    这个js内容和最新版的jwplayer.js一致,随机字符串用于统计,这样我们在官网登陆账号去看数据概况。


    四、注意事项:

    1、Note two very common issues prevent smooth playback of videos in Internet Explorer 9/10. First, you need to set <!DOCTYPE html> to prevent triggering IE's quirks mode. Second, your videos must be served with the video/mp4 mimetype or IE will refuse to play them.

    测试的时候,发现chrome对格式也有要求,错误如下:


    能显示截图,但是播放时就提示不能播放。然而,在本地是可以播放。暂时原因不明,以后补上!------

    后来,换成官网demo的MP4文件,在各主流浏览器下测试通过。

    测试时,jwplayer.html5.js 版本号:6.0.4296


    2、嵌入方式

    Note this is also the only embed syntax JW Player supports. Setups using a <video>, an <embed> tag or SWFObject will not work with JW Player 6.


    即jw6只能通过js方式嵌入。setup方式






  • 相关阅读:
    CSS 按类查看的常用样式属性
    html5前端准备资料
    编译和链接一些错误和警告
    [转]assert()函数用法总结
    [转]C++ 函数模板特化导致的多重定义链接错误
    [转]退出线程的几种方法
    [总结]编程中遇到的vc提示的一些警告
    [转]__declspec(dllexport) 和 __declspec(dllimport)
    [转]PROCESS_INFOMATION
    [转载] STARTUPINFO结构体
  • 原文地址:https://www.cnblogs.com/ycpanda/p/3637220.html
Copyright © 2011-2022 走看看