mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Merge branch '3.6-rc'
This commit is contained in:
commit
39dd3dffe0
733 changed files with 10943 additions and 8237 deletions
|
@ -1,8 +1,8 @@
|
|||
WebRTC Plugin
|
||||
WebRTC Addon
|
||||
=============
|
||||
|
||||
This is a quick and dirty addon to add a [webrtc][1] website as an app. As webrtc
|
||||
advances so rapidly there is s a chance this plugin will be obsolete. Webrtc is
|
||||
advances so rapidly there is s a chance this addon will be obsolete. Webrtc is
|
||||
a new video and audio conferencing tool that is browser to browser
|
||||
communication, no need to download specific software for just conferencing.
|
||||
There are many different webrtc instances and because of the technology it is
|
||||
|
@ -10,7 +10,7 @@ really a person 2 person communication, using the server to only signal who
|
|||
wants to talk to who, the actual transfer of the audio and video is directly
|
||||
between the participants.
|
||||
|
||||
If you would like to try this plugin please download one of the following
|
||||
If you would like to try this addon please download one of the following
|
||||
either Chrome/Chromium 25 or higher or Firefox 21 or higher. Then test it by
|
||||
visiting a known webrtc instance (i.e. [live.mayfirst.org](https://live.mayfirst.org)) create a
|
||||
room, you should be asked to share your camera and microphone (firefox will let
|
||||
|
|
|
@ -10,7 +10,7 @@ msgstr ""
|
|||
"Project-Id-Version: friendica\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-06-23 14:45+0200\n"
|
||||
"PO-Revision-Date: 2014-09-10 14:50+0000\n"
|
||||
"PO-Revision-Date: 2017-09-20 06:09+0000\n"
|
||||
"Last-Translator: fabrixxm <fabrix.xm@gmail.com>\n"
|
||||
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
|
@ -6,31 +6,34 @@
|
|||
* Author: Stephen Mahood <https://friends.mayfirst.org/profile/marxistvegan>
|
||||
* Author: Tobias Diekershoff <https://f.diekershoff.de/profile/tobias>
|
||||
*/
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
|
||||
function webrtc_install() {
|
||||
register_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
||||
Addon::registerHook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
||||
}
|
||||
|
||||
function webrtc_uninstall() {
|
||||
unregister_hook('app_menu', 'addon/webrtc/webrtc.php', 'webrtc_app_menu');
|
||||
Addon::unregisterHook('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>';
|
||||
$b['app_menu'][] = '<div class="app-title"><a href="webrtc">' . L10n::t('WebRTC Videochat') . '</a></div>';
|
||||
}
|
||||
|
||||
function webrtc_plugin_admin (&$a, &$o) {
|
||||
function webrtc_addon_admin (&$a, &$o) {
|
||||
$t = get_markup_template( "admin.tpl", "addon/webrtc/" );
|
||||
$o = replace_macros( $t, array(
|
||||
'$submit' => t('Save Settings'),
|
||||
'$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 https://live.mayfirst.org .')),
|
||||
));
|
||||
$o = replace_macros( $t, [
|
||||
'$submit' => L10n::t('Save Settings'),
|
||||
'$webrtcurl' => ['webrtcurl', L10n::t('WebRTC Base URL'), Config::get('webrtc','webrtcurl' ), L10n::t('Page your users will create a WebRTC chat room on. For example you could use https://live.mayfirst.org .')],
|
||||
]);
|
||||
}
|
||||
function webrtc_plugin_admin_post (&$a) {
|
||||
function webrtc_addon_admin_post (&$a) {
|
||||
$url = ((x($_POST, 'webrtcurl')) ? notags(trim($_POST['webrtcurl'])) : '');
|
||||
set_config('webrtc', 'webrtcurl', $url);
|
||||
info( t('Settings updated.'). EOL);
|
||||
Config::set('webrtc', 'webrtcurl', $url);
|
||||
info(L10n::t('Settings updated.'). EOL);
|
||||
}
|
||||
|
||||
function webrtc_module() {
|
||||
|
@ -44,10 +47,10 @@ function webrtc_content(&$a) {
|
|||
$webrtcurl = get_config('webrtc','webrtcurl');
|
||||
|
||||
/* embedd the landing page in an iframe */
|
||||
$o .= '<h2>'.t('Video Chat').'</h2>';
|
||||
$o .= '<p>'.t('WebRTC is a video and audio conferencing tool that works with Firefox (version 21 and above) and Chrome/Chromium (version 25 and above). Just create a new chat room and send the link to someone you want to chat with.').'</p>';
|
||||
$o .= '<h2>'.L10n::t('Video Chat').'</h2>';
|
||||
$o .= '<p>'.L10n::t('WebRTC is a video and audio conferencing tool that works with Firefox (version 21 and above) and Chrome/Chromium (version 25 and above). Just create a new chat room and send the link to someone you want to chat with.').'</p>';
|
||||
if ($webrtcurl == '') {
|
||||
$o .= '<p>'.t('Please contact your friendica admin and send a reminder to configure the WebRTC addon.').'</p>';
|
||||
$o .= '<p>'.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>';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue