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

Merge branch '3.0release' into develop

This commit is contained in:
winlin 2020-02-16 13:31:54 +08:00
commit 0723b36f0e
5 changed files with 62 additions and 10 deletions

View file

@ -43,6 +43,15 @@ 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";
}
if (server == "ossrs.net") {
server = "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 +87,15 @@ 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";
}
if (server == "ossrs.net") {
server = "r.ossrs.net";
}
var queries = [];
if (server != vhost && vhost != "__defaultVhost__") {
queries.push("vhost=" + vhost);
@ -102,6 +120,15 @@ 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";
}
if (server == "ossrs.net") {
server = "r.ossrs.net";
}
var queries = [];
if (server != vhost && vhost != "__defaultVhost__") {
queries.push("vhost=" + vhost);
@ -127,6 +154,15 @@ 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";
}
if (server == "ossrs.net") {
server = "r.ossrs.net";
}
return "rtmp://" + server + ":" + port + "/" + app + "?key=" + key + "&vhost=" + vhost;
}
@ -141,6 +177,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) {

View file

@ -24,6 +24,6 @@
#ifndef SRS_CORE_VERSION3_HPP
#define SRS_CORE_VERSION3_HPP
#define SRS_VERSION3_REVISION 116
#define SRS_VERSION3_REVISION 117
#endif

View file

@ -1105,6 +1105,7 @@ extern void srs_hijack_io_destroy(srs_hijack_io_t ctx);
* create socket, not connect yet.
* @param owner, the rtmp context which create this socket.
* @return 0, success; otherswise, failed.
* TODO: FIXME: Incompatible API for https://github.com/ossrs/srs/blob/2.0release/trunk/src/libs/srs_librtmp.hpp#L989
*/
extern int srs_hijack_io_create_socket(srs_hijack_io_t ctx, srs_rtmp_t owner);
/**
@ -1156,6 +1157,7 @@ extern int srs_hijack_io_writev(srs_hijack_io_t ctx, const iovec *iov, int iov_s
/**
* whether the timeout is never timeout in ms.
* @return 0, with timeout specified; otherwise, never timeout.
* TODO: FIXME: Incompatible API for https://github.com/ossrs/srs/blob/2.0release/trunk/src/libs/srs_librtmp.hpp#L1039
*/
extern int srs_hijack_io_is_never_timeout(srs_hijack_io_t ctx, int64_t tm);
/**