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

For rtc player, use target to overwrite server, vhost and eip.

This commit is contained in:
winlin 2020-04-14 18:15:07 +08:00
parent ba3d293bfd
commit 8d5f91f777

View file

@ -207,6 +207,14 @@ function build_default_hls_url() {
}
function build_default_rtc_url(query) {
// Use target to overwrite server, vhost and eip.
console.log('?target=x.x.x.x to overwrite server, vhost and eip.');
if (query.target) {
query.server = query.vhost = query.eip = query.target;
query.user_query.eip = query.target;
delete query.target;
}
var server = (!query.server)? window.location.hostname:query.server;
var vhost = (!query.vhost)? window.location.hostname:query.vhost;
var app = (!query.app)? "live":query.app;