1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

change ui version to 1.15, fix the publiser bug, support chrome/firefox/safari/ie browsers.

This commit is contained in:
winlin 2013-12-26 08:56:13 +08:00
parent 4b4f317e09
commit 531fa6fb76
8 changed files with 198 additions and 23 deletions

View file

@ -27,18 +27,23 @@
var previous_chats = [];
var no_play = false;
var query = parse_query_string();
$(function(){
// get the vhost and port to set the default url.
// for example: http://192.168.1.213/players/jwplayer6.html?port=1935&vhost=demo
// url set to: rtmp://demo:1935/live/livestream
srs_init_publish("#txt_url");
if (query.agent == "true") {
document.write(navigator.userAgent);
return;
}
$("#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") {
no_play = true;
}
@ -65,6 +70,10 @@
);
};
srs_publisher.on_publisher_error = function(code, desc) {
if (!on_publish_stop()) {
return;
}
error(code, desc + "请重试。");
};
srs_publisher.on_publisher_warn = function(code, desc) {
@ -107,6 +116,18 @@
refresh();
});
function on_publish_stop() {
if (!srs_can_republish()) {
$("#btn_join").attr("disabled", true);
error(0, "您使用的浏览器很弱,请关闭页面后重新打开页面(刷新也不管用)。<br/>推荐使用Chrome/Firefox/Safari/Opera浏览器支持重试");
srs_log_disabled = true;
return false;
}
return true;
}
function update_play_url() {
var url = $("#txt_url").val();
@ -432,6 +453,10 @@
data : "",
dataType : "json",
complete : function() {
if (!on_publish_stop()) {
return;
}
$("#btn_join").attr("disabled", false);
if (complete_pfn) {
complete_pfn();