mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
warning when access rtc demo when http site and auto get url of site to anti mistake operation
This commit is contained in:
parent
e2cc9ecd92
commit
ef213f16a7
@ -69,6 +69,19 @@
|
||||
var recvOnly = true
|
||||
var resArr = []
|
||||
|
||||
var ishttps = 'https:' == document.location.protocol ? true : false
|
||||
var isLocal = "file:" == document.location.protocol ? true : false
|
||||
var url = document.location.protocol+"//"+window.location.host+"/index/api/webrtc?app=live&stream=test&type=play"
|
||||
|
||||
|
||||
if(!ishttps && !isLocal){
|
||||
alert('本demo需要在https的网站访问 (this demo must access in site of https)')
|
||||
}
|
||||
|
||||
if(isLocal){
|
||||
url = "http://127.0.0.1"+"/index/api/webrtc?app=live&stream=test&type=play"
|
||||
}
|
||||
document.getElementById('streamUrl').value = url
|
||||
document.getElementsByName("methond").forEach((el,idx)=>{
|
||||
el.onclick=function(e){
|
||||
if(el.value == "play")
|
||||
|
Loading…
Reference in New Issue
Block a user