Skip to content

Commit

Permalink
2.5.2 version publish
Browse files Browse the repository at this point in the history
1. Added primary param to fix priority of html5 and flash player.
2. Added draggable param in HTML5 player.
3. Fixed the progress bar display problem on bootstrap framework.
4. Fixed the flash player can not play relative video path.
5. Fixes some mini bugs.

----------------------------------------------------
1、增加primary参数,用于确定html5与flash播放的优先级。
2、HTML5模块加入draggable参数。
3、修复了在bootstrap框架中弹窗进度条错误的问题。
4、修复了Flash模块无法播放相对路径视频地址的问题。
5、修复了一此小问题。
  • Loading branch information
jackzhang1204 committed Dec 26, 2014
1 parent 8f3d184 commit e4d80fa
Show file tree
Hide file tree
Showing 59 changed files with 487 additions and 244 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = function(grunt) {
var comments = '/*\n' +
' * Name: SewisePlayer framework 2.5.0\n' +
' * Name: SewisePlayer framework 2.5.2\n' +
' * Author: Jack Zhang\n' +
' * Website: http://player.sewise.com\n' +
' * Date: December 8, 2014\n' +
' * Date: December 26, 2014\n' +
' * Copyright: 2013-2014, Sewise\n' +
' * Mail: jackzhang1204@gmail.com\n' +
' * QQ: 237432172\n' +
Expand Down
11 changes: 10 additions & 1 deletion demos/api_setduration.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,22 @@
SewisePlayer.setDuration(645);
}
function refreshTimeSpan(){
SewisePlayer.refreshTimeSpan("15:30:00", "15:40:00");
SewisePlayer.refreshTimeSpan("00:00:00", "23:59:59");
}
function refreshTimeSpan2(){
SewisePlayer.refreshTimeSpan("00:00:00", "23:59:59", "2014/12/24 12:34:57", 1419392097);
}
setInterval(function(){
console.log("playTime-false: " + SewisePlayer.playTime(false));
console.log("playTime-true: " + SewisePlayer.playTime());
}, 2000);

</script>
</div>
<div style="padding: 10px;float: left;">
<input style="width: 120px; height: 30px;" type="button" value="更新时间跨度" onclick="setDuration()"/>
<input style="width: 120px; height: 30px;" type="button" value="刷新显示时间" onclick="refreshTimeSpan()"/>
<input style="width: 150px; height: 30px;" type="button" value="刷新显示时间带时差" onclick="refreshTimeSpan2()"/>
</div>
<div style="float: left; width: 100%; padding: 10px 30px; "><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fork it on GitHub</a></div>
</body>
Expand Down
4 changes: 3 additions & 1 deletion demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h3>演示例子链接</h3>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/flash_fallback_html5.html">Flash回退HTML5兼容地址播放</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/add_remove_player.html">添加删除播放器</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/poster.html">海报预览</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/primary.html">primary参数</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/audio.html">音频播放</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/live_radio.html">直播音频</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/div_100_percent.html">播放器外层DIV宽高100%显示</a>
Expand All @@ -62,7 +63,8 @@ <h3>演示例子链接</h3>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/flash_m3u8.html">Flash M3U8播放</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/flash_m3u8_aes_128.html">Flash M3U8 AES-128解码播放</a>

<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/vod_api.html">点播API接口</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/vod_api.html">点播API接口(HTML5)</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/vod_api_flash.html">点播API接口(Flash)</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/live_api.html">直播API接口</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/api_toplay.html">toPlay接口使用</a>
<a target="_blank" href="http://jackzhang1204.github.io/sewise/sewise_player/demos/api_setduration.html">setDuration接口使用</a>
Expand Down
3 changes: 2 additions & 1 deletion demos/live_m3u8.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
videourl: "http://116.77.32.199:5080/hls/xikf3h9q.m3u8",
skin: "vodWhite",
title: "Live M3U8",
lang: 'zh_CN'
claritybutton: "disable",
lang: "zh_CN"
}, "player");
</script>

Expand Down
28 changes: 28 additions & 0 deletions demos/primary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
<title>Sewise Player</title>
<script type="text/javascript" src="../player/sewise.player.min.js"></script>
</head>
<body>
<div id="player" style="width: 640px; height: 352px; ">
<script type="text/javascript">
SewisePlayer.setup({
server: "vod",
type: "mp4",
primary: "flash",
videourl: "http://jackzhang1204.github.io/materials/mov_bbb.mp4",
poster: "http://jackzhang1204.github.io/materials/poster.png",
skin: "vodWhite",
claritybutton: "disable",
title: "primary参数可设置为html5或flash",
lang: "zh_CN"
}, "player");
</script>
</div>
<div style="float: left; width: 100%; padding: 10px 30px; "><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fork it on GitHub</a></div>
</body>
</html>
3 changes: 2 additions & 1 deletion demos/request_m3u8_path.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

skin: "vodWhite",
title: "request m3u8 path",
lang: 'zh_CN'
claritybutton: "disable",
lang: "zh_CN"
});
</script>
</div>
Expand Down
10 changes: 6 additions & 4 deletions demos/selection_playing.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@
<div id="player">
<script type="text/javascript">
var programArray = [
{"name": "安眼", "url": "http://115.231.92.47:9110/real.m3u8?channel_idx=1&device_id=A006yd14sc00troxOUPR&duration=0&from_ip=218.80.1.89&rate=1000&user_name=1000&ver=1.0.0.48&token=fQ/dOqERYvZEltcMYAQROmBUTiDfrYkJqUk2lIDt1HS/tVdYIqQtcvuV8DBNFGJQKhupWZ3JaDmNkBzdJKazWQ==&v_width=1280&v_height=720"},
{"name": "优酷", "url": "http://pl.youku.com/playlist/m3u8?ts=1413447142&keyframe=1&ykss=a6ec3d54e76f345821be8ae7&vid=XMzM3MzIwNTI0&type=flv&sid=6413447142906212bad07&token=6701&oip=1944544396&ep=W3QaazLJ6MJjY0RQ87mH5t3ffCVpllWMsoRGJNyNP6EPUnfLuNmZc6IQ9vkzJWPC&did=3f2189e6a744e68de6761a20ceaf379aa8acfad4&ctype=21&ev=1"},
{"name": "乐视", "url": "http://g3.letv.cn/vod/v2/NzQvMzEvNTIvbGV0di11dHMvMTQvdmVyXzAwXzE2LTI2ODY4MjI5LWF2Yy0yMjk1OTQtYWFjLTMyMDAxLTY5Njg3NTMtMjM2MTYwMjg3LTIzZWM2YTJjNGVjZmNjNTYzZWJmYzFmMmQ1MjcwZTRmLTE0MDc3ODUzMzEwMzYubXA0?b=271&mmsid=2181963&tm=1415858824&key=ee1f384d73f341e23289643a14cd3610&platid=3&splatid=304&playid=0&tss=ios&vtype=21&cvid=964198564846&retry=1"}
{"name": "宜和购物", "url": "http://116.77.32.202:5080/data/userdata/vod/resource/201408/21141727.flv.m3u8"},
{"name": "深圳电视剧", "url": "http://116.77.32.199:5080/hls/xikf3h9q.m3u8"},
{"name": "安眼测试", "url": "http://115.231.92.47:9110/real.m3u8?channel_idx=1&device_id=A006yd14sc00troxOUPR&duration=0&from_ip=218.80.1.89&rate=1000&user_name=1000&ver=1.0.0.48&token=fQ/dOqERYvZEltcMYAQROmBUTiDfrYkJqUk2lIDt1HS/tVdYIqQtcvuV8DBNFGJQKhupWZ3JaDmNkBzdJKazWQ==&v_width=1280&v_height=720"},
{"name": "优酷电影", "url": "http://pl.youku.com/playlist/m3u8?ts=1413447142&keyframe=1&ykss=a6ec3d54e76f345821be8ae7&vid=XMzM3MzIwNTI0&type=flv&sid=6413447142906212bad07&token=6701&oip=1944544396&ep=W3QaazLJ6MJjY0RQ87mH5t3ffCVpllWMsoRGJNyNP6EPUnfLuNmZc6IQ9vkzJWPC&did=3f2189e6a744e68de6761a20ceaf379aa8acfad4&ctype=21&ev=1"},
{"name": "乐视电影", "url": "http://g3.letv.cn/vod/v2/NzQvMzEvNTIvbGV0di11dHMvMTQvdmVyXzAwXzE2LTI2ODY4MjI5LWF2Yy0yMjk1OTQtYWFjLTMyMDAxLTY5Njg3NTMtMjM2MTYwMjg3LTIzZWM2YTJjNGVjZmNjNTYzZWJmYzFmMmQ1MjcwZTRmLTE0MDc3ODUzMzEwMzYubXA0?b=271&mmsid=2181963&tm=1415858824&key=ee1f384d73f341e23289643a14cd3610&platid=3&splatid=304&playid=0&tss=ios&vtype=21&cvid=964198564846&retry=1"}
];

SewisePlayer.setup({
Expand Down Expand Up @@ -73,7 +75,7 @@
var url = $("#select").find("option:selected").val();
var title = $("#select").find("option:selected").text();
SewisePlayer.toPlay(url, title, 0, true);
})
});
});

</script>
Expand Down
150 changes: 150 additions & 0 deletions demos/vod_api_flash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>Sewise Player</title>
<script type="text/javascript" src="../player/sewise.player.min.js"></script>
</head>
<body>
<div style="width: 640px; height: 352px; ">
<div id="container" style="width: 640px; height: 360px; ">
<script type="text/javascript">
SewisePlayer.setup({
server: "vod",
type: "flv",
videourl: "http://219.232.161.202:5080/flvseek/data/userdata/vod/resource/201402/OVNNwRk1.flv",
poster: "http://jackzhang1204.github.io/materials/poster.png",
skin: "vodWhite",
title: "Tile 标题",
lang: 'en_US',
claritybutton: 'disable'
}, "container");
</script>
</div>
<script>
//点播接口调用方法
function startPlay(){
SewisePlayer.doPlay();
}
function playPause(){
SewisePlayer.doPause();
}
function seekTo(){
SewisePlayer.doSeek(5);
}
function playStop(){
SewisePlayer.doStop();
}
function changeVolume(){
SewisePlayer.setVolume(0.1);
}
function getDuration(){
alert(SewisePlayer.duration());
}
function getPlayTime(){
alert(SewisePlayer.playTime());
}
/*function switchProgram(){
SewisePlayer.playProgram("xqfa3cZn", 0, true);
}*/
function switchVideo(){
SewisePlayer.toPlay("http://219.232.161.206:5080/flvseek/data/userdata/vismam/downfile/201307/02005220p.flv", "300' start play", 300, true);
}
function toFullScreen(){
SewisePlayer.fullScreen();
}
function toNoramlScreen(){
SewisePlayer.noramlScreen();
}
function getBufferProgress() {
alert(SewisePlayer.bufferProgress());
}


//播放器回调方法
function playerReady(name){
console.log("Sewise Player On Ready 1");
//SewisePlayer.toPlay("http://www.w3school.com.cn/i/movie.mp4", "title", 0, false);
}
SewisePlayer.playerReady(function(name){
console.log("Sewise Player On Ready 2");
});

function onStart(name){
console.log("onStart 1");
}
SewisePlayer.onStart(function(name){
console.log("onStart 2");
});

function onStop(name){
console.log("onStop 1");
}
SewisePlayer.onStop(function(name){
console.log("onStop 2");
});

function onMetadata(meta, name){
console.log("onMetadata 1");
}
SewisePlayer.onMetadata(function(meta, name){
console.log("onMetadata 2");
});

function onClarity(clarity, name){
console.log("onClarity 1");
}
SewisePlayer.onClarity(function(clarity, name){
console.log("onClarity 2");
});

function onPause(name){
console.log("onPause 1");
}
SewisePlayer.onPause(function(name){
console.log("onPause 2");
});

function onSeek(time, name){
console.log("onSeek 1: " + time);
}
SewisePlayer.onSeek(function(time, name){
console.log("onSeek 2: " + time);
});

function onPlayTime(time, name){
console.log("onPlayTime 1: " + time);
}
SewisePlayer.onPlayTime(function(time, name){
console.log("onPlayTime 2: " + time);
});

function onBuffer(pt, name){
console.log("onBuffer 1: " + pt);
}
SewisePlayer.onBuffer(function(pt, name){
console.log("onBuffer 2: " + pt);
});

</script>
<div style="padding-top: 20px;">
<div style="padding-right: 20px;float: left;">[点播接口]</div>
<div style="padding-right: 20px;float: left;"><a href="javascript:startPlay();">播放</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:playPause();">暂停</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:seekTo();">跳转</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:playStop();">停止</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:changeVolume();">更改音量</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:getDuration();">获取总时长</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:getPlayTime();">获取当前时间</a></div>
<!-- <div style="padding-right: 20px;float: left;"><a href="javascript:switchProgram();">切换节目</a></div> -->
<div style="padding-right: 20px;float: left;"><a href="javascript:switchVideo();">切换视频</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:toFullScreen();">全屏</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:toNoramlScreen();">普屏</a></div>
<div style="padding-right: 20px;float: left;"><a href="javascript:getBufferProgress();">缓冲进度</a></div>
<br clear="all"/>
</div>
<div style="float: left; width: 100%; padding: 10px 30px; "><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fork it on GitHub</a></div>
</body>
</html>
8 changes: 7 additions & 1 deletion docs/参数说明.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
### skin
* 说明:[可选]播放器皮肤的相对路径
* 类型:字符串
* 取值:如,'vodOrange'
* 取值:如,"vodOrange"
* 对应:通用

### buffer
Expand Down Expand Up @@ -112,6 +112,12 @@
}`
* 对应:通用

### primary
* 说明:[可选]播放器启用的优先模块,当视频、流同时支持HTML5或Flash播放时,该参数用于确定优先HTML5还是Flash播放。
* 类型:字符串
* 取值:如,"html5", "flash",缺省默认值为:"html5"
* 对应:通用

### 2、非通用参数:
### a.点播专用参数
### videourl
Expand Down
Binary file modified player/flash/SewisePlayer.swf
Binary file not shown.
Binary file modified player/flash/skins/liveOrange.swf
Binary file not shown.
Binary file modified player/flash/skins/liveRadio.swf
Binary file not shown.
Binary file modified player/flash/skins/liveWhite.swf
Binary file not shown.
Loading

0 comments on commit e4d80fa

Please sign in to comment.