[webrtc] loma-one-patch-2 #1445

Closed
loma-one wants to merge 8 commits from loma-one-patch-2 into 2023.09-rc
2 changed files with 12 additions and 4 deletions

View file

@ -20,4 +20,9 @@
width: 100%;
margin-top: 25px;
font-size: 20px;
/* The pageheader box */
Review

Please remove unrelated changes from this PR.

Please remove unrelated changes from this PR.
padding: 20px;
border: 1px solid transparent;
border-radius: 2px;
margin-bottom: 15px;
}

View file

@ -2,9 +2,10 @@
/*
* Name: WebRTC Application
* Description: add a webrtc instance for video/audio
* Version: 1.0
* Version: 1.1
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
* Author: Matthias Ebers <https://loma.ml/profile/feb>
*/
use Friendica\App;
@ -54,13 +55,15 @@ function webrtc_content(): string
/* landingpage to create chatrooms */
$webrtcurl = DI::config()->get('webrtc','webrtcurl');
/* embedd the landing page in an iframe */
/* open the landing page in a new browser window without controls */
$o = '<script>
window.open("' . $webrtcurl . '", "_blank", "toolbar=no,scrollbars=no,resizable=no,top=100,left=100,width=740,height=740");
</script>';
$o .= '<h2>'.DI::l10n()->t('Video Chat').'</h2>';
$o .= '<p>'.DI::l10n()->t('WebRTC is a video and audio conferencing tool that works in all modern browsers. Just create a new chat room and send the link to someone you want to chat with.').'</p>';
if ($webrtcurl == '') {
$o .= '<p>'.DI::l10n()->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;