I am developing a mozilla addon and now I have to record the browser session for a specific time as a video and sent it to the server. The recording of the web session will be triggered and stopped from my addon. How would I record the web session? Whether any jquery plugins are need to be added to my addon or is there any other source that addon sdk provides?
Asked
Active
Viewed 1,766 times
1
-
This is a great idea. I created a cross platform screenshot addon: https://addons.mozilla.org/en-US/firefox/addon/nativeshot/ but recording video is different, you dont want to take a bunch of screenshots every few ms, there are better alternatives. I hear this can be accomplished with webrtc though, so no need for platform api's as i did in my screenshot addon. – Noitidart Nov 02 '15 at 06:43
-
@Noitidart I surfed theough webrtc but they provide screen sharing only and also they ask permission everytime to record the screen. This has to be automated, since the scripts inside a page can't wait till the user approve – Muthu Nov 04 '15 at 06:26
-
To avoid the permission you'll have to use jsctypes. Do you know c and how to read the documentations on MSDN (COM), AppleDocs (CoreFoundation/Cocoa), and I dont know how to do it for Linux yet but something with X. If you can I would love to collaborate with you to knock this out. I needed it as well. – Noitidart Nov 04 '15 at 16:37
-
Btw can you share that code on how to record with webrtc, that would be cool. – Noitidart Nov 04 '15 at 17:44
-
@Noitidart Can u check this link https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/ in chrome browser. This is what exactly I need. But while trying this in firefox , it prompts an error saying "Canvas is not supported in firefox". – Muthu Nov 05 '15 at 06:01
-
Oh i dont have chrome, its giving me that canvas problem on firefox. Does this one work for you: https://www.webrtc-experiment.com/RecordRTC/ this link works great for me, just have to add the addon, which adds the domain to the white list, it doesnt do full screen or multi monitors though it does select windows. – Noitidart Nov 05 '15 at 07:12
-
@Noitidart I tried [webrtc-experiment.com/RecordRTC](https://www.webrtc-experiment.com/RecordRTC/) earlier , here it asks for the user permission everytime about the screen it has to be recorded, which doesn't satisfy my problem. i solved most of the canvas problem in the earlier one through some external js. Now my problem is on assigning window.navigator to a variable firefox throws an error like "setting a property that has only a getter". How to solve this? – Muthu Nov 05 '15 at 09:30
-
If permission is a problem then lets ask this question to the author of that work, he is very friendly, create an issue here: https://github.com/muaz-khan/Firefox-Extensions/issues/2 I'm sure he can show you a way to make it so you don't have to pick a an app. You can default it to Firefox. He's real knowledgeable I looked at his works. – Noitidart Nov 05 '15 at 18:29
-
1@Noitidart I discussed with Muaz-Khan https://disqus.com/home/discussion/recordrtc/class_canvasrecorder/#comment-2354723672 and I just want to inform you and it may help you in any case – Muthu Nov 12 '15 at 05:24
-
Thanks very much @muthu, I'm actually working on a foice to text addon, this will help me. Is webRtc the only way to get the mics? – Noitidart Nov 12 '15 at 08:32
-
@Noitidart I hope that's the only way , In firefox we couldn't record the HTTP webpage through this method and for HTTPs they always prompt for the permission which is very uncomfortable and my scripts modify the page before the permission is granted, which makes the recording useless. I hope firefox browser must soon support recording CanvasCaptureMediaStream which would be the only way. – Muthu Nov 12 '15 at 09:41
-
1@Noitidart Do you know why the screen capturing API works only on HTTPs webpage not on HTTP webpage? Explain Please. Mauz-Khan said this in the discussion https://disqus.com/home/discussion/recordrtc/class_canvasrecorder/#comment-2354723672 – Muthu Nov 12 '15 at 12:22
-
I'm not sure muthu :( – Noitidart Nov 12 '15 at 16:36
-
1@Noitidart The above CanvasRecording is supported in Firefox Developer Edition V44.* and Firefox would release offically by 9 to 10 weeks. Hope U could use this for your voice to text addon. In FF v44 they support CanvasCaptureMediaStream Object in MediaRecorder API – Muthu Nov 13 '15 at 07:02
-
Hey @muthu were you able to create an addon to do this? I'm very interested in using it myself! :) – Noitidart May 06 '16 at 13:01
-
@Noitidart were researching on that and got an idea. Stream Recording doesn't look good in all cases. I thought of capturing the current tab and draw it in a canvas like 10FPS. I would convert them to a image url and save it. I am searching for a video player to play those images sequentially. I ll use the current time stamp to arrange the images. If u come across any video player that suits me, suggest me. – Muthu May 11 '16 at 06:32
1 Answers
1
I got this working in an addon with about:
pages, but I had to trick it into thinking it was https. The addon is a 27mb due to the inclusion of ffmpeg.js for converting video to different formats. So right now to download it you have to from my dropbox - https://www.dropbox.com/s/soemrqn2smmcge2/dist.xpi?dl=0
The code is here on github - https://github.com/Noitidart/Screencastify/
I used webrtc.

Noitidart
- 35,443
- 37
- 154
- 323