* added warnings for gUM an PC on top of test pages for direct accessing
This commit is contained in:
Nils Ohlmeier 2019-07-22 15:15:05 -04:00 коммит произвёл GitHub
Родитель c39b52b8c6
Коммит fe53eb5a14
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 39 добавлений и 14 удалений

Просмотреть файл

@ -48,6 +48,14 @@
<div id="main">
<h2><b>getUserMedia Test Page</b></h2>
<p><a href="https://mozilla.github.io/webrtc-landing">Main webrtc demo page</a></p>
<div id="gum_warn" class="hidden">
<font color="red">
<h4>getUserMedia is missing!</h4>
This page only works when loaded loaded <a href="https://mozilla.github.io/webrtc-landing/gum_test.html">via HTTPS</a> as getUserMedia() can only be accessed via HTTPS.<br><br>
</font>
</div>
<div id="startbuttons">
<input value="Video" onclick="startVideo();" type="button">
<input value="Audio" onclick="startAudio();" type="button">
@ -73,6 +81,10 @@
</div>
<script type="application/javascript">
if (!navigator.mediaDevices.getUserMedia) {
document.getElementById("gum_warn").style.display = "block";
}
var video_status = false;
var video = document.createElement("video");
video.setAttribute("width", 640);

Просмотреть файл

@ -18,18 +18,18 @@
</div>
<div class="row">
<div id="gum" class="span12 offset2 alert alert-error fade in" style="display: none;">
<div id="gum" class="span12 offset2 alert alert-error" style="display: none;">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>mozGetUserMedia is missing!</h4>
Do you have the latest <a href="http://nightly.mozilla.org/">Nightly</a> and set <i>media.navigator.enabled</i> to true?
<h4>getUserMedia is missing!</h4>
This page only works when loaded loaded <a href="https://mozilla.github.io/webrtc-landing/">via HTTPS</a> as getUserMedia() can only be accessed via HTTPS.
</div>
</div>
<div class="row">
<div id="pc" class="span12 offset2 alert alert-error" style="display: none;">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>mozRTCPeerConnection is missing!</h4>
Do you have the latest <a href="http://nightly.mozilla.org/">Nightly</a> and set <i>media.peerconnection.enabled</i> to true?
<h4>RTCPeerConnection is missing!</h4>
This page only works when loaded loaded <a href="https://mozilla.github.io/webrtc-landing/">via HTTPS</a> as RTCPeerConnectio() is only available via HTTPS.
</div>
</div>
@ -37,7 +37,9 @@
<div id="pc" class="span12 offset2 alert" style="display: none;">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Your Firefox is old.</h4>
You have an older version of Firefox that supports WebRTC but may have an incompatible API. For best results, please download the latest <a href="http://nightly.mozilla.org/">Nightly</a>!
You have an older version of Firefox that supports WebRTC but may have an
incompatible API. For best results, please download the latest <a
href="https://nightly.mozilla.org/">Nightly</a>!
</div>
<div class="row offset2">
@ -116,10 +118,10 @@
-->
<script>
if (!navigator.mozGetUserMedia) {
if (!navigator.mediaDevices.getUserMedia) {
document.getElementById("gum").style.display = "block";
}
if (!window.mozRTCPeerConnection) {
if (!window.RTCPeerConnection) {
document.getElementById("pc").style.display = "block";
}
if (BrowserDetect.browser != "Firefox" ||

Просмотреть файл

@ -37,6 +37,13 @@
<h1>Simple RTCPeerConnection Video Test</h1>
<div id="pc_warn" class="hidden">
<font color="red">
<h4>RTCPeerConnection is missing!</h4>
This page only works when loaded loaded <a href="https://mozilla.github.io/webrtc-landing/pc_test.html">via HTTPS</a> as RTCPeerConnectio() is only available via HTTPS.<br><br>
</font>
</div>
<div>
<button id="tehbutton" onclick="start();">Start!</button>
<input type="checkbox" id="fake" value="Use Fake Video/Audio for one stream">
@ -96,6 +103,10 @@
<script type="application/javascript">
if (!window.RTCPeerConnection) {
document.getElementById("pc_warn").style.display = "block";
}
// Lame clone function. Not efficient but we don't have jQuery.
function copy_dictionary (obj) {
return JSON.parse(JSON.stringify(obj));