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-23 11:06:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1783e1f7649ef8bd662bd7a1d0e0ed1df0c59583
1783e1f7
1 parent
46eb1ebd
refine js, move the consts to the head of srs.js
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
25 行增加
和
21 行删除
trunk/research/players/js/srs.js
trunk/research/players/js/srs.js
查看文件 @
1783e1f
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/**
* player specified size.
*/
function
srs_get_player_modal
()
{
return
740
;
}
function
srs_get_player_width
()
{
return
srs_get_player_modal
()
-
30
;
}
function
srs_get_player_height
()
{
return
srs_get_player_width
()
*
9
/
19
;
}
// to query the swf anti cache.
function
srs_get_version_code
()
{
return
"1.9"
;
}
// get the default vhost for players.
function
srs_get_player_vhost
()
{
return
"players"
;
}
// the api server port, for chat room.
function
srs_get_api_server_port
()
{
return
8085
;
}
// get the stream published to vhost,
// generally we need to transcode the stream to support HLS and filters.
// for example, src_vhost is "players", we transcode stream to vhost "players_pub".
// if not equals to the player vhost, return the orignal vhost.
function
srs_get_player_publish_vhost
(
src_vhost
)
{
return
(
src_vhost
!=
srs_get_player_vhost
())?
src_vhost
:(
src_vhost
+
"_pub"
);
}
// for chat, use rtmp only vhost, low latecy, without gop cache.
function
srs_get_player_chat_vhost
(
src_vhost
)
{
return
(
src_vhost
!=
srs_get_player_vhost
())?
src_vhost
:(
src_vhost
+
"_pub_rtmp"
);
}
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/**
* padding the output.
* padding(3, 5, '0') is 00003
...
...
@@ -194,27 +219,6 @@ function srs_parse_rtmp_url(rtmp_url) {
}
/**
* player specified size.
*/
function
srs_get_player_modal
()
{
return
740
;
}
function
srs_get_player_width
()
{
return
srs_get_player_modal
()
-
30
;
}
function
srs_get_player_height
()
{
return
srs_get_player_width
()
*
9
/
19
;
}
// to query the swf anti cache.
function
srs_get_version_code
()
{
return
"1.7"
;
}
// get the default vhost for players.
function
srs_get_player_vhost
()
{
return
"players"
;
}
// the api server port, for chat room.
function
srs_get_api_server_port
()
{
return
8085
;
}
// get the stream published to vhost,
// generally we need to transcode the stream to support HLS and filters.
// for example, src_vhost is "players", we transcode stream to vhost "players_pub".
// if not equals to the player vhost, return the orignal vhost.
function
srs_get_player_publish_vhost
(
src_vhost
)
{
return
(
src_vhost
!=
srs_get_player_vhost
())?
src_vhost
:(
src_vhost
+
"_pub"
);
}
// for chat, use rtmp only vhost, low latecy, without gop cache.
function
srs_get_player_chat_vhost
(
src_vhost
)
{
return
(
src_vhost
!=
srs_get_player_vhost
())?
src_vhost
:(
src_vhost
+
"_pub_rtmp"
);
}
/**
* initialize the page.
* @param rtmp_url the div id contains the rtmp stream url to play
* @param hls_url the div id contains the hls stream url to play
...
...
请
注册
或
登录
后发表评论