mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Support api to specify the WebRTC API port. v4.0.225
This commit is contained in:
parent
c6c2e97189
commit
73d0ce1cee
3 changed files with 17 additions and 11 deletions
|
@ -64,7 +64,7 @@
|
|||
const prefix = `players/?schema=${window.location.protocol.replace(':', '')}`;
|
||||
const httpPort = window.location.port || (window.location.protocol === 'http:' ? 80 : 443);
|
||||
// If not 8080, user should proxy both stream and API to the default port.
|
||||
const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}&api_port=${httpPort}`;
|
||||
const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}&api=${httpPort}`;
|
||||
document.getElementById("enPlayer").setAttribute('href', `${prefix}${query}`);
|
||||
document.getElementById("cnPlayer").setAttribute('href', `${prefix}${query}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue