Moodle plugins directory: WebRTC Experiments | Moodle.org
WebRTC Experiments
Warning! This plugin was discontinued. It is not ready for production sites.
WebRTC Moodle Plugin
Welcome to WebRTC Moodle Plugin!
This project uses the code from http://webrtc-experiment.com
to implement an activity module for Moodle to allow people to interact more freely.
Everything you need to start communicating using your webcam and microphone is an updated browser like Firefox or Chrome. There is no need to install any third-party plugins on your browser. There is no flash here.
Also, this plugin transfer data (audio and video) in a P2P (peer-to-peer) fashion. This way, data is sent directly from one user computer to another. There is no dependency on a "central server" or a "streaming server".
The only dependency on a server is for "signaling events" like room creations, and users joining and leaving. See more about it on the "Signaling server" section of this document.
Features
- Video and audio chat
- With mute/unmute controls for audio and video
- Record video and audio from any peer (or local stream) and save to your computer
- Text chat
- File sharing
- It is P2P file sharing, not integrated with Moodle Files API
- The icon was downloaded from pixabay and is licensed under CC0 Public Domain
It is basically a copy of the all-in-one demo:
https://www.webrtc-experiment.com/RTCMultiConnection/all-in-one.html
But WebRTC is much more than that!
Future features
- Screensharing
- Colaborative canvas
Moodle Versions
This plugin was tested in version 2.7 and 2.8 of Modle.
Install
- Put this code under "moodle/mod/webrtcexperiments"
- you can use composer
- or git
- or you can download the latest version from https://github.com/danielneis/moodle-mod_webrtcexperiments/archive/master.zip
- Visit your Moodle site as administrator to install plugin via web interface
Signaling Server
This module needs a signaling server. To learn more about Signaling, please visit:
https://github.com/muaz-khan/WebRTC-Experiment/blob/master/Signaling.md
The simpleste solution is to run the websocket server over node.js that can be found at:https://github.com/muaz-khan/WebRTC-Experiment/tree/master/websocket-over-nodejs
https://github.com/danielneis/moodle-mod_webrtcexperiments/issues
If you like the plugin and want to say hi publicly instead of sending an email, leave a comment at
https://moodle.org/plugins/view.php?plugin=mod_webrtcexperiments
Please consider adding a screenshot of your plugin to help folks get an idea of what it looks like when installed.
add_to_log() has been deprecated, please rewrite your code to the new events API
line 48 of /lib/deprecatedlib.php: call to debugging()
line 52 of /mod/webrtcexperiments/view.php: call to add_to_log()
Since the version you have provided says that it is for 2.7 and 2.8 it would be good if we could get that updated to the events API; however, I realize that may not be as simple as we would like it. Since this is listed as having release candidate maturity I think it is OK to leave it for now but moving forward we will want to make an effort to address this.
In addition, I was seeing the following when creating a new instance:
Help contents string does not exist: [webrtcname_help, webrtcexperiments]
line 464 of /lib/outputcomponents.php: call to debugging()
line 2130 of /lib/outputrenderers.php: call to help_icon->diag_strings()
line 1893 of /lib/formslib.php: call to core_renderer->help_icon()
line 58 of /mod/webrtcexperiments/mod_form.php: call to MoodleQuickForm->addHelpButton()
line 191 of /lib/formslib.php: call to mod_webrtcexperiments_mod_form->definition()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Did you remember to call setType() for 'signalingserver'? Defaulting to PARAM_RAW cleaning.
line 1310 of /lib/formslib.php: call to debugging()
line 282 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
line 254 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
Could you do a little more testing with creating a new instance with debugging on to tidy these types of messages?
In view.php you have a section prior to an echo with the comment '// Replace the following lines with you own code'. I wonder if it would be better to just make that a setting and let them define it with what you have being the default that they could easily revert to.
It is encouraged to follow Moodles coding style as outlined in: http://docs.moodle.org/dev/Coding_style and http://docs.moodle.org/dev/Coding
The code checker plugin can be quite helpful in fine tuning your code and can be found at: https://moodle.org/plugins/view.php?plugin=local_codechecker
You may wish to consider using that tool to further improve your plugin. Below are the initial results:
Files found: 15
mod/webrtcexperiments/COPYING.txt
mod/webrtcexperiments/README.txt
mod/webrtcexperiments/db/access.php - 1 error(s) and 0 warning(s)
mod/webrtcexperiments/db/install.php - 1 error(s) and 0 warning(s)
mod/webrtcexperiments/db/log.php - 33 error(s) and 0 warning(s)
mod/webrtcexperiments/db/uninstall.php - 1 error(s) and 0 warning(s)
mod/webrtcexperiments/db/upgrade.php - 1 error(s) and 0 warning(s)
mod/webrtcexperiments/grade.php - 1 error(s) and 4 warning(s)
mod/webrtcexperiments/index.php - 2 error(s) and 3 warning(s)
mod/webrtcexperiments/lang/en/webrtcexperiments.php - 1 error(s) and 0 warning(s)
mod/webrtcexperiments/lib.php - 21 error(s) and 10 warning(s)
mod/webrtcexperiments/locallib.php - 1 error(s) and 0 warning(s)
mod/webrtcexperiments/mod_form.php - 9 error(s) and 10 warning(s)
mod/webrtcexperiments/version.php - 2 error(s) and 2 warning(s)
mod/webrtcexperiments/view.php - 4 error(s) and 9 warning(s)
Total: 78 error(s) and 38 warning(s)
For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for your patience with the review and approval process. Peace - Anthony
screen sharing is still somewhat experimental (more than video ;) and altough we have an example at https://www.webrtc-experiment.com/Pluginfree-Screen-Sharing/ in firefox 33 we still have to do some about:config tricks to get it working, so it is on the roadmap but i have no plans to implement this feature anytime soon (next 2 months) unless something changes.
next thing I am planning to implement is a colaborative canvas. =)
kind regards,
Daniel