Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-12-20 18:49:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b5c17e23388f30a14b3b5bd657b97496de799490
b5c17e23
1 parent
42ec5f19
update the srs player, set the DAR.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
16 行增加
和
2 行删除
trunk/research/players/srs_player.html
trunk/research/players/srs_player.html
查看文件 @
b5c17e2
...
...
@@ -77,6 +77,9 @@
$
(
"#btn_dar_4_3"
).
click
(
function
(){
srs_player
.
dar
(
3
,
4
);
});
$
(
"#btn_dar_fill"
).
click
(
function
(){
srs_player
.
dar
(
-
1
,
-
1
);
});
});
/*
...
...
@@ -161,16 +164,26 @@
}
/*
* to set the DAR, for example, DAR=16:9
* @param num, for example, 9. use metadata height if 0.
* @param den, for example, 16. use metadata width if 0.
* @param num, for example, 9.
* use metadata height if 0.
* use user specified height if -1.
* @param den, for example, 16.
* use metadata width if 0.
* use user specified width if -1.
*/
SrsPlayer
.
prototype
.
dar
=
function
(
num
,
den
)
{
if
(
num
==
0
&&
this
.
metadata
)
{
num
=
this
.
metadata
.
height
;
}
else
if
(
num
==
-
1
)
{
num
=
this
.
height
;
}
if
(
den
==
0
&&
this
.
metadata
)
{
den
=
this
.
metadata
.
width
;
}
else
if
(
den
==
-
1
)
{
den
=
this
.
width
;
}
return
this
.
callbackObj
.
ref
.
__dar
(
num
,
den
);
}
SrsPlayer
.
prototype
.
on_player_ready
=
function
()
{
...
...
@@ -254,6 +267,7 @@
<li><a
id=
"btn_dar_21_9"
href=
"#"
>
宽屏影院(21:9)
</a></li>
<li><a
id=
"btn_dar_16_9"
href=
"#"
>
宽屏电影(16:9)
</a></li>
<li><a
id=
"btn_dar_4_3"
href=
"#"
>
窄屏(4:3)
</a></li>
<li><a
id=
"btn_dar_fill"
href=
"#"
>
填充
</a></li>
</ul>
</div>
<button
id=
"btn_pause"
class=
"btn"
>
暂停
</button>
...
...
请
注册
或
登录
后发表评论