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:
parent
ba3d293bfd
commit
8d5f91f777
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue