* 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);

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

@ -16,20 +16,20 @@
<p>Following are a few pages to test various aspects of Mozilla's implementation of WebRTC.</p>
</div>
</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,9 +37,11 @@
<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">
<div class="span3">
<div class="well">
@ -50,7 +52,7 @@
<p><a class="btn btn-small" href="gum_test_aec.html">AEC-in-gUM test</a></p>
</div>
</div>
<div class="span3">
<div class="well">
<h3>Single host 'chat'</h3>
@ -58,7 +60,7 @@
<p><a class="btn btn-large" href="pc_test.html">Try Demo</a></p>
</div>
</div>
<div class="span3">
<div class="well">
<h3>Single host DataChannels</h3>
@ -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">
@ -47,7 +54,7 @@
<label for="audio_only">Audio-only call</label>
<input type="checkbox" id="video_only" value="Video-only call">
<label for="video_only">Video-only call</label>
<br>
<br>
<input type="checkbox" id="disable_video" value="Disable video" onclick="disable_media(pc1, 1, 0);">
<label for="disable_video">Disable video</label>
<input type="checkbox" id="disable_audio" value="Disable audio" onclick="disable_media(pc1, 0, 0);">
@ -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));