mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
Migrating streaming service from ossrs.net to r.ossrs.net
This commit is contained in:
parent
21c2cb6512
commit
23324cde31
1 changed files with 30 additions and 0 deletions
|
@ -43,6 +43,12 @@ function user_extra_params(query, params) {
|
|||
var server = (query.server == undefined)? window.location.hostname:query.server;
|
||||
var vhost = (query.vhost == undefined)? window.location.hostname:query.vhost;
|
||||
|
||||
// Note that ossrs.net provides only web service,
|
||||
// that is migrating to r.ossrs.net
|
||||
if (vhost == "ossrs.net") {
|
||||
vhost = "r.ossrs.net";
|
||||
}
|
||||
|
||||
for (var key in query.user_query) {
|
||||
if (key == 'app' || key == 'autostart' || key == 'dir'
|
||||
|| key == 'filename' || key == 'host' || key == 'hostname'
|
||||
|
@ -78,6 +84,12 @@ function build_default_rtmp_url() {
|
|||
var app = (!query.app)? "live":query.app;
|
||||
var stream = (!query.stream)? "livestream":query.stream;
|
||||
|
||||
// Note that ossrs.net provides only web service,
|
||||
// that is migrating to r.ossrs.net
|
||||
if (vhost == "ossrs.net") {
|
||||
vhost = "r.ossrs.net";
|
||||
}
|
||||
|
||||
var queries = [];
|
||||
if (server != vhost && vhost != "__defaultVhost__") {
|
||||
queries.push("vhost=" + vhost);
|
||||
|
@ -102,6 +114,12 @@ function build_default_publish_rtmp_url() {
|
|||
var app = (!query.app)? "live":query.app;
|
||||
var stream = (!query.stream)? "demo":query.stream;
|
||||
|
||||
// Note that ossrs.net provides only web service,
|
||||
// that is migrating to r.ossrs.net
|
||||
if (vhost == "ossrs.net") {
|
||||
vhost = "r.ossrs.net";
|
||||
}
|
||||
|
||||
var queries = [];
|
||||
if (server != vhost && vhost != "__defaultVhost__") {
|
||||
queries.push("vhost=" + vhost);
|
||||
|
@ -127,6 +145,12 @@ function build_default_bandwidth_rtmp_url() {
|
|||
var app = (!query.app)? "app":query.app;
|
||||
var key = (!query.key)? "35c9b402c12a7246868752e2878f7e0e":query.key;
|
||||
|
||||
// Note that ossrs.net provides only web service,
|
||||
// that is migrating to r.ossrs.net
|
||||
if (vhost == "ossrs.net") {
|
||||
vhost = "r.ossrs.net";
|
||||
}
|
||||
|
||||
return "rtmp://" + server + ":" + port + "/" + app + "?key=" + key + "&vhost=" + vhost;
|
||||
}
|
||||
|
||||
|
@ -141,6 +165,12 @@ function build_default_bandwidth_rtmp_url() {
|
|||
function build_default_hls_url() {
|
||||
var query = parse_query_string();
|
||||
|
||||
// Note that ossrs.net provides only web service,
|
||||
// that is migrating to r.ossrs.net
|
||||
if (query.hls_vhost == "ossrs.net") {
|
||||
query.hls_vhost = "r.ossrs.net";
|
||||
}
|
||||
|
||||
// for http, use hls_vhost to override server if specified.
|
||||
var server = window.location.hostname;
|
||||
if (query.server != undefined) {
|
||||
|
|
Loading…
Reference in a new issue