FBa
1
I’m trying to see how I can change this video to a video that is streamed through my WebRTC. Is this possible???
// In Babylon
var videoDome = new BABYLON.VideoDome(
“skybox”,
[“https://yoda.blob.core.windows.net/videos/uptale360.mp4”],
{
resolution: 32,
clickToPlay: true
},
scene
);
// In PeerJS a wrapper of WebRTC
var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
if (getUserMedia) {
getUserMedia({
video: true,
audio: true
}, function(stream) {
var call = peer.call(‘theid’, stream);
call.on(‘stream’, function(stream) {
var video = document.querySelector(‘video’);
video.srcObject = stream;
video.onloadedmetadata = function(e) {
video.play();
};
});
}, function(err) {
});
}
The video dome ultimately uses a Video Element so if you can configure it it should work
FBa
3
Please let me know if you have any tips…sort of stuck between the var video and how I can then assign this video to the BabylonJS one.
well you can get the video element from the dome and then use it like a regular video element
FBa
5
Can this be accomplished with a few equal signs or there is a particular way to connect that? Btw, I’m using PeerJS for the wrapper for WebRTC.
Meanwhile, on a side note: why is my webcam not showing? Babylon.js Playground
It was working earlier but then after a few times, the webcam stops to convey on the screen. I’m using a desktop (and I have tried multiple browsers)
Thanks!
Well this is more a question for them
we can provide the video element and then there should be some doc on their side to connect to it
for your webcam not showing this is because the plane was wrong:
FBa
7
On desktop the webcam on the plane looks skinnier, and on the mobile it looks fatter when in portrait mode…is there a way to adjust the aspect ratio?
you want it to be fullscreen?
FBa
10
is fullscreen a viable option then?
well tell me what you want then?