One question that I have is: Is it possible to implement screen sharing that works on a wide range of devices and browsers without the need for plugins or experimental settings?
I have searched online and come across some plugins for Chrome, but I am looking for a solution that does not require any additional installations or settings.
The ideal scenario would be to have a stream from the navigator similar to how I capture video from my camera.
Here is the code snippet for capturing video from the camera:
this.navig.getUserMedia = ( this.navig.getUserMedia || this.navig.webkitGetUserMedia || this.navig.mozGetUserMedia || this.navig.msGetUserMedia );
this.navig.getUserMedia({video: true, audio: true}, (stream) => {
this.videoElement.nativeElement.src = window.URL.createObjectURL(stream);
this.videoElement.nativeElement.play();
}, (error) => console.warn('video error' + error))
Therefore, I am interested in obtaining a stream object with my screen captured. Is this achievable?
I have come across this code online, but unfortunately, it is returning errors...
navigator.mediaDevices.getDisplayMedia({ video: true })
.then(stream => {
// we have a stream, attach it to a feedback video element
videoElement.srcObject = stream;
}, error => {
console.log("Unable to acquire screen capture", error);
});