mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Player: Refine code
This commit is contained in:
parent
a28f98581e
commit
08e19406ef
5 changed files with 68 additions and 162 deletions
|
@ -244,8 +244,15 @@
|
|||
|
||||
if (true) {
|
||||
var urlObject = parse_rtmp_url($("#txt_url").val());
|
||||
var schema = window.location.protocol;
|
||||
|
||||
// If user specifies the schema, use it as API schema.
|
||||
var schema = urlObject.user_query.schema;
|
||||
schema = schema? schema + ':' : window.location.protocol;
|
||||
|
||||
var port = urlObject.port || 1985;
|
||||
if (schema === 'https:') {
|
||||
port = urlObject.port || 443;
|
||||
}
|
||||
|
||||
// @see https://github.com/rtcdn/rtcdn-draft
|
||||
var api = urlObject.user_query.play || '/rtc/v1/play/';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue