Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head><meta charset="UTF-8"></head> |
michael@0 | 4 | <body> |
michael@0 | 5 | <div id="message"></div> |
michael@0 | 6 | <script> |
michael@0 | 7 | function message(m) { |
michael@0 | 8 | document.getElementById("message").innerHTML = m; |
michael@0 | 9 | window.parent.postMessage(m, "*"); |
michael@0 | 10 | } |
michael@0 | 11 | |
michael@0 | 12 | var gStream; |
michael@0 | 13 | |
michael@0 | 14 | function requestDevice(aAudio, aVideo) { |
michael@0 | 15 | window.navigator.mozGetUserMedia({video: aVideo, audio: aAudio, fake: true}, |
michael@0 | 16 | function(stream) { |
michael@0 | 17 | gStream = stream; |
michael@0 | 18 | message("ok"); |
michael@0 | 19 | }, function(err) { message("error: " + err); }); |
michael@0 | 20 | } |
michael@0 | 21 | message("pending"); |
michael@0 | 22 | |
michael@0 | 23 | function closeStream() { |
michael@0 | 24 | if (!gStream) |
michael@0 | 25 | return; |
michael@0 | 26 | gStream.stop(); |
michael@0 | 27 | gStream = null; |
michael@0 | 28 | message("closed"); |
michael@0 | 29 | } |
michael@0 | 30 | </script> |
michael@0 | 31 | </body> |
michael@0 | 32 | </html> |