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-24 10:29:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5636fc7ca2d4142482593e329728b8c487b252e5
5636fc7c
1 parent
47e173bf
update ui, remove the collaps of local video.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
53 行增加
和
18 行删除
trunk/research/players/srs_chat.html
trunk/research/players/srs_publisher.html
trunk/research/players/srs_chat.html
查看文件 @
5636fc7
...
...
@@ -28,6 +28,10 @@
// url set to: rtmp://demo:1935/live/livestream
srs_init_publish
(
"#txt_url"
);
$
(
"#realtime_player_url"
).
tooltip
({
title
:
"右键复制RTMP地址"
});
// if no play specified, donot show the player, for debug the publisher.
var
query
=
parse_query_string
();
if
(
query
.
no_play
==
"true"
)
{
...
...
@@ -63,6 +67,8 @@
};
srs_publisher
.
start
();
update_play_url
();
if
(
!
no_play
)
{
// start the realtime player.
realtime_player
=
new
SrsPlayer
(
"realtime_player"
,
430
,
185
);
...
...
@@ -77,6 +83,12 @@
refresh
();
});
function
update_play_url
()
{
var
url
=
$
(
"#txt_url"
).
val
();
$
(
"#realtime_player_url"
).
attr
(
"href"
,
url
).
attr
(
"target"
,
"_blank"
);
}
function
refresh
()
{
if
(
!
self_chat
)
{
setTimeout
(
refresh
,
1000
);
...
...
@@ -200,8 +212,8 @@
$
(
obj
).
attr
(
"chat_id"
,
chat
.
id
);
$
(
obj
).
attr
(
"id"
,
"div_"
+
chat
.
id
);
// for specifed chat: $("#div_" + chat_id)
$
(
obj
).
attr
(
"class"
,
"div_chat"
);
// for all chats: $(".div_chat")
$
(
obj
).
find
(
"#realtime_player"
).
attr
(
"id"
,
"rp_"
+
chat
.
id
);
// for specifed player: $("#rp_" + chat_id)
$
(
obj
).
find
(
"#realtime_player_raw"
).
attr
(
"id"
,
"rp_raw_"
+
chat
.
id
);
// for specifed player: $("#rp_raw_" + chat_id)
$
(
obj
).
find
(
"#chat_player"
).
attr
(
"id"
,
"rp_"
+
chat
.
id
);
// for specifed player: $("#rp_" + chat_id)
$
(
obj
).
find
(
"#chat_player_raw"
).
attr
(
"id"
,
"rp_raw_"
+
chat
.
id
);
// for specifed player: $("#rp_raw_" + chat_id)
$
(
obj
).
find
(
"#user_name"
).
text
(
chat
.
username
);
$
(
obj
).
find
(
"#join_date"
).
text
(
chat
.
join_date_str
);
$
(
obj
).
find
(
"#collapseM"
).
attr
(
"id"
,
"collapse_"
+
global_chat_user_id
);
...
...
@@ -456,11 +468,11 @@
<div
class=
"span6"
>
<div
class=
"accordion-group"
>
<div
class=
"accordion-heading"
>
<span
class=
"accordion-toggle"
data-toggle=
"collapse"
href=
"#collapseN"
>
<span
class=
"accordion-toggle"
>
<strong>
[我的] 本地摄像头
</strong>
</span>
</div>
<div
id=
"collapseM"
class=
"accordion-body collapse in"
>
<div
class=
"accordion-body collapse in"
>
<div
class=
"accordion-inner"
>
<div
id=
"local_publisher"
></div>
</div>
...
...
@@ -470,11 +482,14 @@
<div
class=
"span6"
>
<div
class=
"accordion-group"
>
<div
class=
"accordion-heading"
>
<span
class=
"accordion-toggle"
data-toggle=
"collapse"
href=
"#collapseN"
>
<span
class=
"accordion-toggle"
>
<strong>
[我的] 远程服务器流
</strong>
<a
id=
"realtime_player_url"
href=
"#"
data-toggle=
"tooltip"
data-placement=
"top"
title=
""
>
播放地址
<img
src=
"img/tooltip.png"
/>
</a>
</span>
</div>
<div
id=
"collapseM"
class=
"accordion-body collapse in"
>
<div
class=
"accordion-body collapse in"
>
<div
class=
"accordion-inner"
>
<div
id=
"realtime_player"
></div>
</div>
...
...
@@ -498,8 +513,8 @@
<div
class=
"span2"
>
</div>
<div
class=
"span8"
>
<div
id=
"realtime_player"
>
<div
id=
"realtime_player_raw"
>
<div
id=
"chat_player"
>
<div
id=
"chat_player_raw"
>
</div>
</div>
</div>
...
...
trunk/research/players/srs_publisher.html
查看文件 @
5636fc7
...
...
@@ -37,6 +37,12 @@
$
(
"#low_latecy_tips"
).
tooltip
({
title
:
"服务器不转码直接转发FLASH编码器的流,所以延迟比支持HLS的流要低很多"
});
$
(
"#realtime_player_url"
).
tooltip
({
title
:
"右键复制RTMP地址"
});
$
(
"#remote_player_url"
).
tooltip
({
title
:
"右键复制RTMP地址"
});
$
(
"#btn_publish"
).
click
(
on_user_publish
);
...
...
@@ -61,6 +67,8 @@
};
srs_publisher
.
start
();
update_play_url
();
// if no play specified, donot show the player, for debug the publisher.
var
query
=
parse_query_string
();
if
(
query
.
no_play
!=
"true"
)
{
...
...
@@ -95,6 +103,10 @@
var
ret
=
srs_parse_rtmp_url
(
url
);
var
query
=
parse_query_string
();
var
remote_url
=
"rtmp://"
+
ret
.
server
+
":"
+
ret
.
port
+
"/"
+
ret
.
app
+
"...vhost..."
+
srs_get_player_publish_vhost
(
ret
.
vhost
)
+
"/"
+
ret
.
stream
;
$
(
"#realtime_player_url"
).
attr
(
"href"
,
url
).
attr
(
"target"
,
"_blank"
);
$
(
"#remote_player_url"
).
attr
(
"href"
,
remote_url
).
attr
(
"target"
,
"_blank"
);
var
srs_player_url
=
"http://"
+
query
.
host
+
query
.
dir
+
"/srs_player.html?"
;
srs_player_url
+=
"vhost="
+
srs_get_player_publish_vhost
(
ret
.
vhost
)
+
"&port="
+
ret
.
port
+
"&app="
+
ret
.
app
+
"&stream="
+
ret
.
stream
;
srs_player_url
+=
"&autostart=true"
;
...
...
@@ -118,10 +130,12 @@
if
(
$
(
"#btn_publish"
).
text
()
==
"停止发布"
)
{
srs_publisher
.
stop
();
$
(
"#btn_publish"
).
text
(
"发布视频"
);
$
(
"#txt_play_realtime"
).
text
(
"RTMP低延时(请发布视频)"
).
attr
(
"href"
,
"#"
).
attr
(
"target"
,
"_self"
);
$
(
"#txt_play_url"
).
text
(
"RTMP已转码(请发布视频)"
).
attr
(
"href"
,
"#"
).
attr
(
"target"
,
"_self"
);
$
(
"#txt_play_hls"
).
text
(
"HLS-m3u8(请发布视频)"
).
attr
(
"href"
,
"#"
).
attr
(
"target"
,
"_self"
);
$
(
"#txt_play_jwplayer"
).
text
(
"HLS-JWPlayer(请发布视频)"
).
attr
(
"href"
,
"#"
).
attr
(
"target"
,
"_self"
);
//$("#txt_play_realtime").text("RTMP低延时(请发布视频)").attr("href", "#").attr("target", "_self");
//$("#txt_play_realtime").attr("href", "#").attr("target", "_self");
//$("#txt_play_url").text("RTMP已转码(请发布视频)").attr("href", "#").attr("target", "_self");
//$("#remote_player_url").attr("href", "#").attr("target", "_self");
//$("#txt_play_hls").text("HLS-m3u8(请发布视频)").attr("href", "#").attr("target", "_self");
//$("#txt_play_jwplayer").text("HLS-JWPlayer(请发布视频)").attr("href", "#").attr("target", "_self");
return
;
}
...
...
@@ -339,11 +353,11 @@
<div
class=
"span6"
>
<div
class=
"accordion-group"
>
<div
class=
"accordion-heading"
>
<span
class=
"accordion-toggle"
data-toggle=
"collapse"
href=
"#collapse1"
>
<span
class=
"accordion-toggle"
>
<strong>
本地摄像头
</strong>
</span>
</div>
<div
id=
"collapse1"
class=
"accordion-body collapse in"
>
<div
class=
"accordion-body collapse in"
>
<div
class=
"accordion-inner"
>
<div
id=
"local_publisher"
></div>
</div>
...
...
@@ -353,14 +367,17 @@
<div
class=
"span6"
>
<div
class=
"accordion-group"
>
<div
class=
"accordion-heading"
>
<span
class=
"accordion-toggle"
data-toggle=
"collapse"
href=
"#collapse2"
>
<span
class=
"accordion-toggle"
>
<strong>
远程服务器
</strong>
<a
id=
"remote_tips"
href=
"#"
data-toggle=
"tooltip"
data-placement=
"top"
title=
""
>
黑屏
<img
src=
"img/tooltip.png"
/>
</a>
<a
id=
"remote_player_url"
href=
"#"
data-toggle=
"tooltip"
data-placement=
"top"
title=
""
>
播放地址
<img
src=
"img/tooltip.png"
/>
</a>
</span>
</div>
<div
id=
"collapse2"
class=
"accordion-body collapse in"
>
<div
class=
"accordion-body collapse in"
>
<div
class=
"accordion-inner"
>
<div
id=
"remote_player"
></div>
</div>
...
...
@@ -374,14 +391,17 @@
<div
class=
"span6"
>
<div
class=
"accordion-group"
>
<div
class=
"accordion-heading"
>
<span
class=
"accordion-toggle"
data-toggle=
"collapse"
href=
"#collapse3"
>
<span
class=
"accordion-toggle"
>
<strong>
远程服务器
</strong>
<a
id=
"low_latecy_tips"
href=
"#"
data-toggle=
"tooltip"
data-placement=
"top"
title=
""
>
低延时
<img
src=
"img/tooltip.png"
/>
</a>
<a
id=
"realtime_player_url"
href=
"#"
data-toggle=
"tooltip"
data-placement=
"top"
title=
""
>
播放地址
<img
src=
"img/tooltip.png"
/>
</a>
</span>
</div>
<div
id=
"collapse3"
class=
"accordion-body collapse in"
>
<div
class=
"accordion-body collapse in"
>
<div
class=
"accordion-inner"
>
<div
id=
"realtime_player"
></div>
</div>
...
...
请
注册
或
登录
后发表评论