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
2016-03-19 10:18:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0a2e00f8c5d1b0ce2e27765d4f75e1368f2387f7
0a2e00f8
1 parent
9ab5039b
dump logs
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
24 行增加
和
0 行删除
trunk/research/players/js/srs.player.js
trunk/research/players/srs_player.html
trunk/research/players/srs_player/src/Utility.as
trunk/research/players/srs_player/src/srs_player.as
trunk/research/players/js/srs.player.js
查看文件 @
0a2e00f
...
...
@@ -164,6 +164,12 @@ SrsPlayer.prototype.empty_count = function() {
return
this
.
__fluency
.
total_empty_count
;
}
/**
* get all log data.
*/
SrsPlayer
.
prototype
.
dump_log
=
function
()
{
return
this
.
callbackObj
.
ref
.
__dump_log
();
}
/**
* to set the DAR, for example, DAR=16:9 where num=16,den=9.
* @param num, for example, 16.
* use metadata width if 0.
...
...
trunk/research/players/srs_player.html
查看文件 @
0a2e00f
...
...
@@ -561,6 +561,9 @@
$
(
"#main_modal"
).
on
(
"hide"
,
function
(){
if
(
srs_player
)
{
// report the log to backend.
console
.
log
(
srs_player
.
dump_log
());
srs_player
.
stop
();
srs_player
=
null
;
}
...
...
trunk/research/players/srs_player/src/Utility.as
查看文件 @
0a2e00f
...
...
@@ -9,6 +9,11 @@ package
public
class
Utility
{
/**
* total log.
*/
public
static
var
logData
:
String
=
""
;
/**
* initialize the player by flashvars for config.
* @param flashvars the config.
*/
...
...
@@ -23,6 +28,8 @@ package
public
static
function
log
(
js_id
:
String
,
msg
:
String
)
:
void
{
msg
=
"["
+
new
Date
()
+
"][srs-player]["
+
js_id
+
"] "
+
msg
;
logData
+=
msg
+
"\n"
;
trace
(
msg
)
;
if
(
!
flash
.
external
.
ExternalInterface
.
available
)
{
...
...
trunk/research/players/srs_player/src/srs_player.as
查看文件 @
0a2e00f
...
...
@@ -131,6 +131,7 @@ package
flash
.
external
.
ExternalInterface
.
addCallback
(
"__set_fs"
,
this
.
js_call_set_fs_size
)
;
flash
.
external
.
ExternalInterface
.
addCallback
(
"__set_bt"
,
this
.
js_call_set_bt
)
;
flash
.
external
.
ExternalInterface
.
addCallback
(
"__set_mbt"
,
this
.
js_call_set_mbt
)
;
flash
.
external
.
ExternalInterface
.
addCallback
(
"__dump_log"
,
this
.
js_call_dump_log
)
;
flash
.
external
.
ExternalInterface
.
call
(
this
.
js_on_player_ready
,
this
.
js_id
)
;
}
...
...
@@ -273,6 +274,13 @@ package
log
(
"user resume play"
)
;
}
}
/**
* dumps all log data.
*/
private
function
js_call_dump_log
()
:
String
{
return
Utility
.
logData
;
}
/**
* to set the DAR, for example, DAR=16:9 where num=16,den=9.
...
...
请
注册
或
登录
后发表评论