javascript - How to modify the content of WebRTC MediaStream video track? -


i use webrtc in scenario in client video stream recorded on third-party server https://tokbox.com/. put kind of watermark in recorded video.

investigation brought me page http://w3c.github.io/webrtc-pc/#mediastreamtrack , seems technically possible since says that:

a mediastream acquired using getusermedia() is, default, accessible application. means application able access contents of tracks, modify content, , send media peer chooses.

this need, didn't find examples or explanation of function. i'd advice webrtc experts.

you need use canvas route video getusermedia to, modify there, , use canvas.capturestream() turn mediastream. great - except canvas.capturestream(), while agreed in wg hasn't been included in spec yet. (there's pull request proposed verbiage mozilla wrote.)

as far implementations: initial implementation of capturestream() landed in firefox nightly (41), , it's still behind pref until bug or 2 fixed. can enable canvas.capturestream.enabled in about:config. can see demo @ mozilla's test page capturestream().

doing without canvas.capturestream() tough; you're best way getusermedia->canvas-> , use video.capturestream() (or capturestreamuntilended()) - however, video.capturestream waiting formal acceptance. mozilla has had video.capturestream() time, however, , think works in ff 38 (current release).


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -