diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-04-23 15:32:23 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-04-23 15:32:23 -0400 |
commit | abe80cc31d5a40ebed743085011fbcda0c1a9a10 (patch) | |
tree | fb3762f06b84745b182af281abb107b95a9fcf01 /mobile/android/tests/browser/robocop/robocop_getusermedia2.html | |
parent | 63295d0087eb58a6eb34cad324c4c53d1b220491 (diff) | |
download | UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.gz UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.lz UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.tar.xz UXP-abe80cc31d5a40ebed743085011fbcda0c1a9a10.zip |
Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android
Diffstat (limited to 'mobile/android/tests/browser/robocop/robocop_getusermedia2.html')
-rw-r--r-- | mobile/android/tests/browser/robocop/robocop_getusermedia2.html | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/mobile/android/tests/browser/robocop/robocop_getusermedia2.html b/mobile/android/tests/browser/robocop/robocop_getusermedia2.html deleted file mode 100644 index a3ffa2966..000000000 --- a/mobile/android/tests/browser/robocop/robocop_getusermedia2.html +++ /dev/null @@ -1,83 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>gUM Test Page</title> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" charset="utf-8"> -</head> -<body> - <div id="content"></div> - <script type="application/javascript"> - var video_status = false; - var video = document.createElement("video"); - video.setAttribute("width", 640); - video.setAttribute("height", 480); - - var audio_status = false; - var audio = document.createElement("audio"); - audio.setAttribute("controls", true); - - var content = document.getElementById("content"); - document.title = "gUM Test Page"; - - startAudioVideo(); - - function startAudioVideo() { - video_status = true; - audio_status = true; - mediaConstraints = { - video: true, - audio: true - }; - startMedia(mediaConstraints); - } - - function stopMedia() { - if (video_status) { - video.mozSrcObject.stop(); - video.mozSrcObject = null; - content.removeChild(video); - capturing = false; - video_status = false; - } - if (audio_status) { - audio.mozSrcObject.stop(); - audio.mozSrcObject = null; - content.removeChild(audio); - audio_status = false; - } - } - - function startMedia(param) { - try { - window.navigator.mozGetUserMedia(param, function(stream) { - if (video_status) { - content.appendChild(video); - video.mozSrcObject = stream; - video.play(); - } - if (audio_status) { - content.appendChild(audio); - audio.mozSrcObject = stream; - audio.play(); - } - var audioTracks = stream.getAudioTracks(); - var videoTracks = stream.getVideoTracks(); - document.title = ""; - if (audioTracks.length > 0) { - document.title += "audio"; - } - if (videoTracks.length > 0) { - document.title += "video"; - } - document.title += " gumtest"; - audio.mozSrcObject.stop(); - video.mozSrcObject.stop(); - }, function(err) { - document.title = "failed gumtest"; - stopMedia(); - }); - } catch(e) { - stopMedia(); - } - } -</script> -</body></html> |