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-26 13:31:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5cec96793183c3dcc2643e5996bae45528911c3c
5cec9679
1 parent
c51842aa
refine the index. refine the parse_query_string, add user_query object to result
隐藏空白字符变更
内嵌
并排对比
正在显示
10 个修改的文件
包含
28 行增加
和
12 行删除
trunk/research/players/index.html
trunk/research/players/js/srs.page.js
trunk/research/players/js/srs.utility.js
trunk/research/players/jwplayer6.html
trunk/research/players/osmf.html
trunk/research/players/srs_bwt.html
trunk/research/players/srs_chat.html
trunk/research/players/srs_player.html
trunk/research/players/srs_publisher.html
trunk/research/players/vlc.html
trunk/research/players/index.html
查看文件 @
5cec967
...
...
@@ -8,6 +8,7 @@
<script
type=
"text/javascript"
src=
"js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/swfobject.js"
></script>
<script
type=
"text/javascript"
src=
"js/srs.page.js"
></script>
<script
type=
"text/javascript"
src=
"js/srs.utility.js"
></script>
<style>
body
{
padding-top
:
55px
;
...
...
@@ -17,10 +18,19 @@
$
(
function
(){
update_nav
();
// direct to the default vhost for players.
var
query
=
""
+
window
.
location
.
search
;
query
=
query
.
substr
(
1
);
window
.
location
.
href
=
"srs_chat.html?"
+
"vhost="
+
srs_get_player_vhost
()
+
"&"
+
query
;
var
query
=
parse_query_string
();
var
url
=
"srs_chat.html?vhost="
+
srs_get_player_vhost
();
for
(
var
key
in
query
.
user_query
)
{
if
(
key
==
"vhost"
)
{
continue
;
}
url
+=
"&"
+
key
+
"="
+
query
[
key
];
}
setTimeout
(
function
(){
window
.
location
.
href
=
url
;
},
100
);
});
</script>
</head>
...
...
@@ -28,7 +38,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/js/srs.page.js
查看文件 @
5cec967
...
...
@@ -31,6 +31,7 @@ function srs_get_player_chat_vhost(src_vhost) { return (src_vhost != srs_get_pla
* update the navigator, add same query string.
*/
function
update_nav
()
{
$
(
"#srs_index"
).
attr
(
"href"
,
"index.html"
+
window
.
location
.
search
);
$
(
"#nav_srs_player"
).
attr
(
"href"
,
"srs_player.html"
+
window
.
location
.
search
);
$
(
"#nav_srs_publisher"
).
attr
(
"href"
,
"srs_publisher.html"
+
window
.
location
.
search
);
$
(
"#nav_srs_chat"
).
attr
(
"href"
,
"srs_chat.html"
+
window
.
location
.
search
);
...
...
trunk/research/players/js/srs.utility.js
查看文件 @
5cec967
...
...
@@ -17,6 +17,7 @@ function padding(number, length, prefix) {
function
parse_query_string
(){
var
obj
=
{};
// add the uri object.
// parse the host(hostname:http_port), pathname(dir/filename)
obj
.
host
=
window
.
location
.
host
;
obj
.
hostname
=
window
.
location
.
hostname
;
...
...
@@ -30,6 +31,9 @@ function parse_query_string(){
obj
.
filename
=
obj
.
pathname
.
substr
(
obj
.
pathname
.
lastIndexOf
(
"/"
));
}
// pure user query object.
obj
.
user_query
=
{};
// parse the query string.
var
query_string
=
String
(
window
.
location
.
search
).
replace
(
" "
,
""
).
split
(
"?"
)[
1
];
if
(
query_string
==
undefined
){
...
...
@@ -40,6 +44,7 @@ function parse_query_string(){
$
(
queries
).
each
(
function
(){
var
query
=
this
.
split
(
"="
);
obj
[
query
[
0
]]
=
query
[
1
];
obj
.
user_query
[
query
[
0
]]
=
query
[
1
];
});
return
obj
;
...
...
trunk/research/players/jwplayer6.html
查看文件 @
5cec967
...
...
@@ -82,7 +82,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/osmf.html
查看文件 @
5cec967
...
...
@@ -78,7 +78,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/srs_bwt.html
查看文件 @
5cec967
...
...
@@ -28,7 +28,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/srs_chat.html
查看文件 @
5cec967
...
...
@@ -546,7 +546,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/srs_player.html
查看文件 @
5cec967
...
...
@@ -269,7 +269,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li
class=
"active"
><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/srs_publisher.html
查看文件 @
5cec967
...
...
@@ -214,7 +214,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
trunk/research/players/vlc.html
查看文件 @
5cec967
...
...
@@ -24,7 +24,7 @@
<div
class=
"navbar navbar-fixed-top"
>
<div
class=
"navbar-inner"
>
<div
class=
"container"
>
<a
class=
"brand"
href=
"index.html
"
>
SRS
</a>
<a
id=
"srs_index"
class=
"brand"
href=
"#
"
>
SRS
</a>
<div
class=
"nav-collapse collapse"
>
<ul
class=
"nav"
>
<li><a
id=
"nav_srs_player"
href=
"srs_player.html"
>
SRS播放器
</a></li>
...
...
请
注册
或
登录
后发表评论