-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
487 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ node_modules | |
*.zip.sig | ||
.buildpath | ||
.classpath | ||
js/ijsxc.config.js | ||
build/js/ijsxc.config.js | ||
config.inc.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
v1.0.0 / 2014-11-06 | ||
=== | ||
init with jsxc v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
require '../config.inc.php'; | ||
|
||
$config = $ijsxc_config; | ||
|
||
$json = json_encode(array(xmpp => $config['xmpp'])); | ||
|
||
echo $json; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
require '../config.inc.php'; | ||
|
||
$config = $ijsxc_config['ice']; | ||
|
||
$data = array (); | ||
$data ['ttl'] = $config['ttl'] ? : 3600 * 24; // one day (according to TURN-REST-API) | ||
$data ['url'] = $config['url']; | ||
$data ['username'] = $config['username'] ? : ($config['secret'] ? (time () + $data ['ttl']) . ':username' : ''); | ||
$data ['credential'] = $config['credential'] ? : ($config['secret'] ? base64_encode ( hash_hmac ( 'sha1', $data ['username'], $config['secret'], true ) ) : ''); | ||
|
||
echo json_encode($data); | ||
?> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
require '../config.inc.php'; | ||
|
||
$config = $ijsxc_config; | ||
|
||
$json = json_encode(array(xmpp => $config['xmpp'])); | ||
|
||
echo $json; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
require '../config.inc.php'; | ||
|
||
$config = $ijsxc_config['ice']; | ||
|
||
$data = array (); | ||
$data ['ttl'] = $config['ttl'] ? : 3600 * 24; // one day (according to TURN-REST-API) | ||
$data ['url'] = $config['url']; | ||
$data ['username'] = $config['username'] ? : ($config['secret'] ? (time () + $data ['ttl']) . ':username' : ''); | ||
$data ['credential'] = $config['credential'] ? : ($config['secret'] ? base64_encode ( hash_hmac ( 'sha1', $data ['username'], $config['secret'], true ) ) : ''); | ||
|
||
echo json_encode($data); | ||
?> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
include_once("./Services/UIComponent/classes/class.ilUserInterfaceHookPlugin.php"); | ||
|
||
/** | ||
* Example user interface plugin | ||
* | ||
* @author Klaus Herberth <[email protected]> | ||
* @version 1.0.0 | ||
* | ||
*/ | ||
class ilijsxcPlugin extends ilUserInterfaceHookPlugin | ||
{ | ||
function getPluginName() | ||
{ | ||
return "ijsxc"; | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php | ||
|
||
include_once("./Services/UIComponent/classes/class.ilUIHookPluginGUI.php"); | ||
require_once('./Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/ijsxc/config.inc.php'); | ||
|
||
/** | ||
* User interface hook class | ||
* | ||
* @author Klaus Herberth <[email protected]> | ||
* @version 1.0.0 | ||
* @ingroup ServicesUIComponent | ||
*/ | ||
class ilijsxcUIHookGUI extends ilUIHookPluginGUI | ||
{ | ||
|
||
private $webroot = './Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/ijsxc/'; | ||
private $jsFiles = array( | ||
productive => array( | ||
'js/lib/jquery.ui.min.js', | ||
'js/jsxc/lib/jquery.colorbox-min.js', | ||
'js/jsxc/lib/jquery.slimscroll.js', | ||
'js/jsxc/lib/jquery.fullscreen.js', | ||
'js/jsxc/lib/jsxc.dep.min.js', | ||
'js/jsxc/jsxc.min.js', | ||
'js/ijsxc.js' | ||
), | ||
development => array( | ||
'js/lib/jquery.ui.min.js', | ||
'js/jsxc/lib/jquery.colorbox-min.js', | ||
'js/jsxc/lib/jquery.slimscroll.js', | ||
'js/jsxc/lib/jquery.fullscreen.js', | ||
'js/jsxc/lib/strophe.js', | ||
'js/jsxc/lib/strophe.muc.js', | ||
'js/jsxc/lib/strophe.disco.js', | ||
'js/jsxc/lib/strophe.caps.js', | ||
'js/jsxc/lib/strophe.vcard.js', | ||
'js/jsxc/lib/strophe.jingle/strophe.jingle.js', | ||
'js/jsxc/lib/strophe.jingle/strophe.jingle.session.js', | ||
'js/jsxc/lib/strophe.jingle/strophe.jingle.sdp.js', | ||
'js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js', | ||
'js/jsxc/lib/otr/build/dep/salsa20.js', | ||
'js/jsxc/lib/otr/build/dep/bigint.js', | ||
'js/jsxc/lib/otr/build/dep/crypto.js', | ||
'js/jsxc/lib/otr/build/dep/eventemitter.js', | ||
'js/jsxc/lib/otr/build/otr.js', | ||
'js/jsxc/jsxc.lib.js', | ||
'js/jsxc/jsxc.lib.webrtc.js', | ||
'js/ijsxc.js' | ||
) | ||
); | ||
|
||
private $cssFiles = array( | ||
'css/jquery-ui.min.css', | ||
'css/jquery.colorbox.css', | ||
'js/jsxc/jsxc.css', | ||
'js/jsxc/jsxc.webrtc.css', | ||
'css/jsxc.ilias.css' | ||
); | ||
|
||
/** | ||
* Modify HTML output of GUI elements. Modifications modes are: | ||
* - ilUIHookPluginGUI::KEEP (No modification) | ||
* - ilUIHookPluginGUI::REPLACE (Replace default HTML with your HTML) | ||
* - ilUIHookPluginGUI::APPEND (Append your HTML to the default HTML) | ||
* - ilUIHookPluginGUI::PREPEND (Prepend your HTML to the default HTML) | ||
* | ||
* @param string $a_comp component | ||
* @param string $a_part string that identifies the part of the UI that is handled | ||
* @param string $a_par array of parameters (depend on $a_comp and $a_part) | ||
* | ||
* @return array array with entries "mode" => modification mode, "html" => your html | ||
*/ | ||
function getHTML($a_comp, $a_part, $a_par = array()) | ||
{ | ||
global $ilCtrl, $ilUser, $ijsxc_config; | ||
|
||
$env = ($ijsxc_config['debug'] === true) ? 'development' : 'productive'; | ||
|
||
if ($a_part == 'template_load' && !$ilCtrl->IsAsynch() && strtolower($a_par['tpl_id']) == 'tpl.main.html') { | ||
$html = ''; | ||
|
||
foreach ($this->cssFiles as $file) { | ||
$html .= '<link href="'.$this->webroot.$file.'" media="all" rel="stylesheet" type="text/css" />'; | ||
} | ||
|
||
foreach ($this->jsFiles[$env] as $file) { | ||
$html .= '<script src="'.$this->webroot.$file.'"></script>'; | ||
} | ||
|
||
return array('mode' => ilUIHookPluginGUI::APPEND, 'html' => $html); | ||
} | ||
|
||
return array("mode" => ilUIHookPluginGUI::KEEP, "html" => ""); | ||
} | ||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
$ijsxc_config = array ( | ||
debug => false, | ||
xmpp => array ( | ||
/** url to bosh server binding. */ | ||
url => '/http-bind/', | ||
|
||
/** domain part of your jid */ | ||
domain => 'localhost', | ||
|
||
/** which resource should be used? Blank, means random. */ | ||
resource => '', | ||
|
||
/** Allow user to overwrite xmpp settings? */ | ||
overwrite => true, | ||
|
||
/** Should chat start on login? */ | ||
onlogin => true | ||
), | ||
ice => array ( | ||
/** Lifetime of credentials. */ | ||
ttl => 60*60*12, | ||
|
||
/** TURN server url. */ | ||
url => 'numb.viagenie.ca', | ||
|
||
/** If no username is set, the TURN REST API is used. */ | ||
username => '[email protected]', | ||
|
||
/** If no credential is set, the TURN REST API is used. */ | ||
credential => 'muazkh', | ||
|
||
/** Secret for TURN REST API. */ | ||
secret => '' | ||
) | ||
); | ||
|
||
?> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.