This isnβt something Iβve done, but Iβm interested!
Within the getDisplayMedia permissions dialog, the user gets to choose whether they share the whole screen or just a window.
To stream just part of the screen, you could copy the video to a canvas element and crop it there, then export the canvas back to a MediaStream using the captureStream method.
As for streaming to RTMP, that is not something built into the browser. Youβll need to stream to a server using webRTC or web sockets and then have the server turn it into a RTMP stream.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can capture desktop video using
getDisplayMedia
as I show in this post on desktop capture in Edge. This works for Chrome now too, though you used to need an extension. Firefox supports desktop capture, but with an non-standard methods.Once you capture the media stream, you can use the
MediaRecorder
just like in this post.ok i got my response for the specific window capture
Maybe you will know this too so !
Can we stream just a part of the screen or can we take just a specific window
Do you know how to send this media stream to a rtmp flux ?
This isnβt something Iβve done, but Iβm interested!
Within the
getDisplayMedia
permissions dialog, the user gets to choose whether they share the whole screen or just a window.To stream just part of the screen, you could copy the video to a canvas element and crop it there, then export the canvas back to a
MediaStream
using the captureStream method.As for streaming to RTMP, that is not something built into the browser. Youβll need to stream to a server using webRTC or web sockets and then have the server turn it into a RTMP stream.