diff --git a/trunk/research/players/srs_chat.html b/trunk/research/players/srs_chat.html index 4db93c89b..dc9e6ab89 100755 --- a/trunk/research/players/srs_chat.html +++ b/trunk/research/players/srs_chat.html @@ -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 @@