Tweak video attributes
parent
8d55104712
commit
be8538f3bd
|
@ -49,9 +49,10 @@ Status : <span id="message">Please wait for the chat request to be accepted.
|
||||||
|
|
||||||
peer.onStreamAdded = function(e) {
|
peer.onStreamAdded = function(e) {
|
||||||
var video = e.mediaElement;
|
var video = e.mediaElement;
|
||||||
video.setAttribute('width', 600);
|
video.setAttribute('width', 640);
|
||||||
|
video.setAttribute('height', 480);
|
||||||
video.setAttribute('controls', true);
|
video.setAttribute('controls', true);
|
||||||
video.volume = 0.2;
|
video.volume = 0.5;
|
||||||
document.getElementById("chat_area").appendChild(video);
|
document.getElementById("chat_area").appendChild(video);
|
||||||
video.play();
|
video.play();
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<script src="api.js"> </script>
|
<script src="api.js"> </script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="message">
|
<div id="message" align="right">
|
||||||
<font color="red">
|
<font color="red">
|
||||||
<h2>Urgent: Security breached.</h2>
|
<h2>Urgent: Security breached.</h2>
|
||||||
|
|
||||||
|
@ -34,9 +34,10 @@
|
||||||
|
|
||||||
peer.onStreamAdded = function(e) {
|
peer.onStreamAdded = function(e) {
|
||||||
var video = e.mediaElement;
|
var video = e.mediaElement;
|
||||||
video.setAttribute('width', 600);
|
video.setAttribute('width', 640);
|
||||||
|
video.setAttribute('height', 480);
|
||||||
video.setAttribute('controls', true);
|
video.setAttribute('controls', true);
|
||||||
video.volume = 0.2;
|
video.volume = 0.5;
|
||||||
document.getElementById("message").style.display = "none";
|
document.getElementById("message").style.display = "none";
|
||||||
document.getElementById("chat_area").appendChild(video);
|
document.getElementById("chat_area").appendChild(video);
|
||||||
video.play();
|
video.play();
|
||||||
|
|
|
@ -157,9 +157,6 @@ class Webcam
|
||||||
|
|
||||||
args = ''
|
args = ''
|
||||||
if remote_browser_path =~ /Chrome/
|
if remote_browser_path =~ /Chrome/
|
||||||
# https://src.chromium.org/viewvc/chrome?revision=221000&view=revision
|
|
||||||
# args = "--allow-file-access-from-files --disable-user-media-security --disable-web-security"
|
|
||||||
|
|
||||||
args = "--allow-file-access-from-files"
|
args = "--allow-file-access-from-files"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue