mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-09-29 17:02:49 +00:00
Dateien nach „audon“ hochladen
Audon must not be loaded inframe. Otherwise the microphone cannot be addressed. The change causes a new browser window to open. In this window, the microphone can be addressed and communication with other participants can be started. The browser must allow a new window to be opened.
This commit is contained in:
parent
cc17ec5685
commit
b1c10e8e66
1 changed files with 16 additions and 13 deletions
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Name: Audon Application
|
* Name: Audon Application
|
||||||
* Description: add a Audon instance. Based on webRTC Addon
|
* Description: add an Audon instance. Based on webRTC Addon
|
||||||
* Version: 0.1
|
* Version: 0.2
|
||||||
* 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>
|
* Author: Matthias Ebers <https://loma.ml/profile/feb>
|
||||||
|
@ -26,12 +26,12 @@ function audon_addon_admin(string &$o)
|
||||||
{
|
{
|
||||||
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/audon/');
|
$t = Renderer::getMarkupTemplate('admin.tpl', 'addon/audon/');
|
||||||
$o = Renderer::replaceMacros($t, [
|
$o = Renderer::replaceMacros($t, [
|
||||||
'$submit' => DI::l10n()->t('Save Settings'),
|
'$submit' => DI::l10n()->t('Save Settings'),
|
||||||
'$audonurl' => [
|
'$audonurl' => [
|
||||||
'audonurl',
|
'audonurl',
|
||||||
DI::l10n()->t('Audon Base URL'),
|
DI::l10n()->t('Audon Base URL'),
|
||||||
DI::config()->get('audon','audonurl'),
|
DI::config()->get('audon', 'audonurl'),
|
||||||
DI::l10n()->t('Page your users will create an Audon audio chat room on. For example you could use https://audon.space.'),
|
DI::l10n()->t('Page your users will create an Audon audio chat room on. For example, you could use https://audon.space.'),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -46,23 +46,26 @@ function audon_addon_admin_post()
|
||||||
* existence of this method is checked to figure out if the addon offers a
|
* existence of this method is checked to figure out if the addon offers a
|
||||||
* module.
|
* module.
|
||||||
*/
|
*/
|
||||||
function audon_module() {}
|
function audon_module()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
function audon_content(): string
|
function audon_content(): string
|
||||||
{
|
{
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
/* landingpage to create chatrooms */
|
/* landing page to create chatrooms */
|
||||||
$audonurl = DI::config()->get('audon', 'audonurl');
|
$audonurl = DI::config()->get('audon', 'audonurl');
|
||||||
|
|
||||||
|
/* open the landing page in a new browser window without controls */
|
||||||
|
$o = '<script>
|
||||||
|
window.open("' . $audonurl . '", "_blank", "toolbar=no,scrollbars=no,resizable=no,top=100,left=100,width=740,height=600");
|
||||||
|
</script>';
|
||||||
|
|
||||||
/* embedd the landing page in an iframe */
|
|
||||||
$o .= '<h2>' . DI::l10n()->t('Audio Chat') . '</h2>';
|
$o .= '<h2>' . DI::l10n()->t('Audio Chat') . '</h2>';
|
||||||
$o .= '<p>' . DI::l10n()->t('Audon is an audio conferencing tool. Connect your account to Audon and create a room. Share the generated link to talk to other participants.') . '</p>';
|
$o .= '<p>' . DI::l10n()->t('Audon is an audio conferencing tool. Connect your account to Audon and create a room. Share the generated link to talk to other participants.') . '</p>';
|
||||||
if ($audonurl == '') {
|
if ($audonurl == '') {
|
||||||
$o .= '<p>' . DI::l10n()->t('Please contact your Friendica administrator to remind them to configure the Audon addon.') . '</p>';
|
$o .= '<p>' . DI::l10n()->t('Please contact your Friendica administrator to remind them to configure the Audon addon.') . '</p>';
|
||||||
} else {
|
|
||||||
$o .= '<iframe src="' . $audonurl . '" width="740px" height="600px"></iframe>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
Loading…
Reference in a new issue