[webrtc] loma-one-patch-2 #1445
|
@ -2,9 +2,10 @@
|
||||||
/*
|
/*
|
||||||
* Name: WebRTC Application
|
* Name: WebRTC Application
|
||||||
* Description: add a webrtc instance for video/audio
|
* Description: add a webrtc instance for video/audio
|
||||||
* Version: 1.0
|
* Version: 1.1
|
||||||
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
|
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
|
||||||
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
|
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
|
||||||
|
* Author: Matthias Ebers <https://loma.ml/profile/feb>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
|
@ -54,13 +55,17 @@ function webrtc_content(): string
|
||||||
/* landingpage to create chatrooms */
|
/* landingpage to create chatrooms */
|
||||||
$webrtcurl = DI::config()->get('webrtc','webrtcurl');
|
$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 .= '<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>';
|
$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 == '') {
|
if ($webrtcurl == '') {
|
||||||
$o .= '<p>'.DI::l10n()->t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'</p>';
|
$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;
|
return $o;
|
||||||
|
|
Loading…
Reference in a new issue