Opened 6 years ago

Closed 6 years ago

#7250 closed Feature/Enhancement Request (fixed)

lmo (webrtc) app for / friendica

Reported by: Owned by:
Priority: Medium Component: Tech
Keywords: webrtc app friendica php lmo Cc: Support-team@…
Sensitive: no


In a brief conversation with a developer for the friendica software I asked if he was aware of any development to integrate webrtc and and video conferencing into their platform. Unfortunately there is no known development for the friendica software. But he did respond in saying that I should try to create one.

So I took at look at the github for the irc app that we have live on the site. It seems we need a little css code and php to call the lmo site in a frame or just css code. My php skills are limited but I would like to try to develop this but need some support on building the php file.

I can take ownership but would appreciate some php folks to give support and direction


Change History (4)

comment:1 Changed 6 years ago by

  • Owner set to
  • Status changed from new to assigned

I'm sure you will get the assistance you need mv. Though I'm not 100% certain that webrtc is going to work inside an iframe.

comment:2 Changed 6 years ago by

ross, thanks and now there is code to review :)

Along with the same colleague encouraging the creation of an app for and for the friendica community there is now one in the branch of the friendica addons git

It is technically working on or through the apps link on the top bar. However there are some issues with the code as a tag that I am not sure about prevents the "create it" button from appearing in the body of the iframe. There are other themes that do not break the code. However the way the php file is built it should ask when visiting the app which webrtc instance the user would like to use, however, our current git pull is a couple version behind. So for the moment the .htconfig.php file has been altered at the bottom with

// Temp to test webrtc before gitpull
$a->config['webrtc']['webrtcurl'] = '';

I have not successfully pulled the most recent git of friendica as the "git pull" command did not work resulting in this

0 friends@howard:~/$ git pull
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.
1 friends@howard:~/$

Here is the php file that is being used

* Name: WebRTC Application
* Description: add a webrtc instance for video/audio
* Version: 1.0
* Author: stephen mahood <>
* Author: Tobias Diekershoff <>

function webrtc_install() {
        register_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');

function webrtc_uninstall() {
        unregister_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');


function webrtc_app_menu($a,&$b) {
$b['app_menu'][] = '<div class="app-title"><a href="webrtc">' . t('WebRTC Videochat') . '</a></div>';

function webrtc_plugin_admin (&$a, &$o) {
        $t = get_markup_template( "admin.tpl", "addon/webrtc/" );
$o = replace_macros( $t, array(
'$submit' => t('Submit'),
'$webrtcurl' => array('webrtcurl', t('WebRTC Base URL'), get_config('webrtc','webrtcurl' ), t('Page your users will create a WebRTC chat room on. For example you could use .')),
function webrtc_plugin_admin_post (&$a) {
        $url = ((x($_POST, 'webrtcurl')) ? notags(trim($_POST['webrtcurl'])) : '');
set_config('webrtc', 'webrtcurl', $url);
info( t('Settings updated.'). EOL);

function webrtc_module() {

function webrtc_content(&$a) {
        $o = '';

        /* landingpage to create chatrooms */
        $webrtcurl = get_config('webrtc','webrtcurl');

        /* embedd the landing page in an iframe */
        $o .= '<h2>'.t('Video Chat').'</h2>';
        $o .= '<p>FIXME some short information for the enduser what to do. Best surrounded in a <code>t()</code> call so the text can be translated.</p>';
if ($webrtcurl == '') {
$o .= '<p>'.t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'</p>';
} else {
$o .= '<iframe src="'.$webrtcurl.'" width="600px" height="600px"></iframe>';

        return $o;


comment:3 Changed 6 years ago by

Awesome mv!!! I went ahead and made a couple of changes to diabook so that it allows for the creation of rooms.

The changes are on line 12, line 15, and line 59 of the file view/theme/diabook/bottom.tpl .

I suspect that this might complicate the git pull from the friendica repo, though I'm not sure.

The git command I think you want from the web directory is:

git pull github master


comment:4 Changed 6 years ago by

  • Resolution set to fixed
  • Status changed from assigned to closed

The webrtc app is functional and has a pull request for the friendica addon github

Though we still need to update our friendica instance this has been tested by updated servers by tobias

So we have an app w00t!


Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.