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
2015-09-17 17:48:33 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
8c2c5984fb52ef92bc44496710495bfa0b2a2c6f
8c2c5984
2 parents
2c21f74e
e8680527
Merge pull request #483 from CallMeNP/patch-1
为research/players/srs_player 考虑静态资源部署到单独域名的情况
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
24 行增加
和
2 行删除
trunk/research/players/js/srs.player.js
trunk/research/players/srs_player/src/srs_player.as
trunk/research/players/js/srs.player.js
查看文件 @
8c2c598
...
...
@@ -25,6 +25,7 @@ function SrsPlayer(container, width, height, private_object) {
this
.
buffer_time
=
0.3
;
// default to 0.3
this
.
volume
=
1.0
;
// default to 100%
this
.
callbackObj
=
null
;
this
.
srs_player_url
=
"srs_player/release/srs_player.swf?_version="
+
srs_get_version_code
();
// callback set the following values.
this
.
meatadata
=
{};
// for on_player_metadata
...
...
@@ -88,7 +89,7 @@ SrsPlayer.prototype.start = function(url) {
var
self
=
this
;
swfobject
.
embedSWF
(
"srs_player/release/srs_player.swf?_version="
+
srs_get_version_code
()
,
this
.
srs_player_url
,
this
.
container
,
this
.
width
,
this
.
height
,
"11.1.0"
,
"js/AdobeFlashPlayerInstall.swf"
,
...
...
@@ -183,6 +184,25 @@ SrsPlayer.prototype.set_bt = function(buffer_time) {
this
.
buffer_time
=
buffer_time
;
this
.
callbackObj
.
ref
.
__set_bt
(
buffer_time
);
}
/**
* set the srs_player.swf url
* @param url, srs_player.swf's url.
* @param params, object.
*/
SrsPlayer
.
prototype
.
set_srs_player_url
=
function
(
url
,
params
)
{
var
query_array
=
[],
query_string
=
""
,
p
;
params
=
params
||
{};
params
.
_version
=
srs_get_version_code
();
for
(
p
in
params
)
{
if
(
params
.
hasOwnProperty
(
p
))
{
query_array
.
push
(
p
+
"="
+
encodeURIComponent
(
params
[
p
]));
}
}
query_string
=
query_array
.
join
(
"&"
);
this
.
srs_player_url
=
url
+
"?"
+
query_string
;
}
SrsPlayer
.
prototype
.
on_player_ready
=
function
()
{
}
SrsPlayer
.
prototype
.
on_player_metadata
=
function
(
metadata
)
{
...
...
trunk/research/players/srs_player/src/srs_player.as
查看文件 @
8c2c598
...
...
@@ -79,6 +79,8 @@ package
this
.
stage
.
addEventListener
(
FullScreenEvent
.
FULL_SCREEN
,
this
.
user_on_stage_fullscreen
)
;
Security
.
allowDomain
(
"*"
)
;
this
.
addChild
(
this
.
control_fs_mask
)
;
this
.
control_fs_mask
.
buttonMode
=
true
;
this
.
control_fs_mask
.
addEventListener
(
MouseEvent
.
CLICK
,
user_on_click_video
)
;
...
...
@@ -591,4 +593,4 @@ package
ExternalInterface
.
call
(
"console.log"
,
msg
)
;
}
}
}
\ No newline at end of file
}
...
...
请
注册
或
登录
后发表评论