home15 Offline

32 Male    92
         
I'm looking for those who'd like to work as an English teacher online.
--------------------------------------------------------
No relationship or dates. I already have what I need.

programmergirl220
programmergirl220: When I replace:

video.src = webkitURL.createObjectURL(stream);

with

video.srcObject = webkitURL.MediaStream;

I get no errors in the console. createObjectURL has been deprecated and replaced with MediaStream.
1 month ago Report Link
0
View all 7 posts
programmergirl220
programmergirl220: Excellent! I'm sure you've got this but give me a shout if you come across anything else, I may be able to help.
1 month ago Report
0
home15
home15:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<base target="_blank">
<title>getUserMedia</title>
</head>

<body>

<div id="container">
<video id="gum-local" autoplay playsinline></video>
<button id="showVideo">Open camera</button>
</div>
<script>
const constraints = window.constraints = {
audio: false,
video: true
};

function handleSuccess(stream) {
const video = document.querySelector('video';
const videoTracks = stream.getVideoTracks();
console.log('Got stream with constraints:', constraints);
console.log(`Using video device: ${videoTracks[0].label}`);
window.stream = stream; // make variable available to browser console
video.srcObject = stream;
}
async function init(e) {
try {
const stream = await navigator.mediaDevices.getUserMedia(constraints);
handleSuccess(stream);
e.target.disabled = true;
} catch (e) {
handleError(e);
}
}

document.querySelector('#showVideo'.addEventListener('click', e => init(e));
</script>
</body>
</html>
1 month ago Report
0
home15
home15: here working code, it differs much from initial code?
1 month ago Report
0
home15 got the Master Troll badge from bpatter789 11 months ago Report
0
(Post deleted by bpatter789 10 months ago)
(Post deleted by home15 11 months ago)
(Post deleted by bpatter789 1 month ago)
programmergirl220
1 month ago Report Link
0
programmergirl220
programmergirl220: Many developers, myself included, use Stack Overflow when we run into trouble. The link below may shed some light for you

//https://stackoverflow.com/questions/27120757/failed-to-execute-createobjecturl-on-url
1 month ago Report Link
0
programmergirl220
1 month ago Report Link
0
programmergirl220
1 month ago Report Link
0
programmergirl220
1 month ago Report Link
0
programmergirl220
1 month ago Report Link
0
programmergirl220
programmergirl220: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video</title>
<style>
#vid {
border: 1px solid black;
}
</style>
</head>
<body>
<video id="vid" autoplay="true"></video>
<button id="btn" onclick="start()">Start</button>
<script src="main.js"></script>
</body>
</html>



video = document.getElementById("vid";
function start() {
navigator.webkitGetUserMedia({video:true}, gotStream,
function() {});

btn.disabled = true;
}

function gotStream(stream) {

video.src = webkitURL.createObjectURL(stream);


}
1 month ago Report Link
0
home15
home15 to AGM65D: hi
2 months ago Report Link
0
home15
home15 to lismay: Count your life by smiles, not tears. Count your age by friends, not years. Happy birthday!
2 months ago Report Link
0
lismay
lismay: Thanks
2 months ago Report
0
Diana_sunny got the I ★ Wireclub badge from home15 9 months ago Report
0
Diana_sunny
Diana_sunny: ty so much,,
2 months ago Report
0
home15 started a new conversation: Java program language in Science 3 months ago Report
0
home15 Created a new chat room:
Java program language 3 months ago Report
0
home15
home15 to nadiaesra: hi
4 months ago Report Link
0
home15 started a new conversation: Game Green World in Science 5 months ago Report
1
home15 started a new conversation: Science Lab in Science 5 months ago Report
0
home15 Created a new chat room:
Intelligence 5 months ago Report
0
home15 got the Techie badge from anonymouspoet 6 months ago Report
0
home15
home15: thank yoooooooooooooooooooooooooooou
6 months ago Report
0
anonymouspoet 6 months ago Report
0
home15 got the Brainiac badge from anonymouspoet 6 months ago Report
0
home15
home15: thank yoooooooooooooooooooooooooooou
6 months ago Report
0
anonymouspoet 6 months ago Report
0
home15
home15 added new images to his gallery Posted Images 6 months ago Report
0
home15
6 months ago Report Link
0
DjSassNJazz got the DJ badge from home15 7 months ago Report
1
Shaily_ got the Santa's Helper badge from home15 7 months ago Report
0
home15 got the Santa's Helper badge from Angel0099 7 months ago Report
0
More