Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
.idea*
4 changes: 4 additions & 0 deletions classes/Conf/class.xoctConf.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -60,6 +60,10 @@ class xoctConf extends ActiveRecord {
const NO_METADATA = 0;
const ALL_METADATA = 1;
const METADATA_EXCEPT_DATE_PLACE = 2;

const USE_STREAMING = 'use_streaming';
const STREAMING_URL = 'streaming_url';

/**
* @var array
*/
Expand Down
14 changes: 14 additions & 0 deletions classes/Conf/class.xoctConfFormGUI.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -196,6 +196,20 @@ protected function initAPISection() {
$te->setInfo($this->parent_gui->txt(xoctConf::F_CURL_PASSWORD . '_info'));
$te->setRequired(true);
$this->addItem($te);

$h = new ilFormSectionHeaderGUI();
$h->setTitle($this->parent_gui->txt('streaming'));
$this->addItem($h);

$te = new ilTextInputGUI($this->parent_gui->txt(xoctConf::STREAMING_URL), xoctConf::STREAMING_URL);
$te->setInfo($this->parent_gui->txt(xoctConf::STREAMING_URL . '_info'));
$te->setRequired(false);
$this->addItem($te);

$te = new ilCheckboxInputGUI($this->parent_gui->txt(xoctConf::USE_STREAMING), xoctConf::USE_STREAMING);
$te->setInfo($this->parent_gui->txt(xoctConf::USE_STREAMING . '_info'));
$te->setRequired(false);
$this->addItem($te);
}


Expand Down
70 changes: 52 additions & 18 deletions classes/Event/class.xoctEventGUI.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -482,7 +482,10 @@ public function streamVideo() {
}, []);

$duration = 0;
$streams = array_map(function (xoctMedia $media) use (&$duration, &$previews) {

$id = filter_input(INPUT_GET, self::IDENTIFIER);

$streams = array_map(function (xoctMedia $media) use (&$duration, &$previews, &$id) {
$url = $media->getUrl();
if (xoctConf::getConfig(xoctConf::F_SIGN_PLAYER_LINKS)) {
$url = xoctSecureLink::sign($url);
Expand All@@ -504,23 +507,54 @@ public function streamVideo() {
$preview_url = "";
}

return [
"type" => xoctMedia::MEDIA_TYPE_VIDEO,
"role" => ($role !== xoctMedia::ROLE_PRESENTATION ? self::ROLE_MASTER : self::ROLE_SLAVE),
"sources" => [
"mp4" => [
[
"src" => $url,
"mimetype" => $media->getMediatype(),
"res" => [
"w" => $media->getWidth(),
"h" => $media->getHeight()
]
]
]
],
"preview" => $preview_url
];


if( xoctConf::getConfig(xoctConf::USE_STREAMING)) {

$smilURLIdentifier = ($role !== xoctMedia::ROLE_PRESENTATION ? "_presenter" : "_presentation");

$streamingServerURL = xoctConf::getConfig(xoctConf::STREAMING_URL);

return [
"type" => xoctMedia::MEDIA_TYPE_VIDEO,
"role" => ($role !== xoctMedia::ROLE_PRESENTATION ? self::ROLE_MASTER : self::ROLE_SLAVE),
"sources" => [
"hls" => [
[
"src" => $streamingServerURL ."/smil:engage-player_". $id . $smilURLIdentifier . ".smil/playlist.m3u8",
"mimetype" => "application/x-mpegURL"
],
],
"dash" => [
[
"src" => $streamingServerURL ."/smil:engage-player_". $id . $smilURLIdentifier . ".smil/manifest_mpm4sav_mvlist.mpd",
"mimetype" => "application/dash+xml"
]
]
],
"preview" => $preview_url
];
}
else{
return [
"type" => xoctMedia::MEDIA_TYPE_VIDEO,
"role" => ($role !== xoctMedia::ROLE_PRESENTATION ? self::ROLE_MASTER : self::ROLE_SLAVE),
"sources" => [
"mp4" => [
[
"src" => $url,
"mimetype" => $media->getMediatype(),
"res" => [
"w" => $media->getWidth(),
"h" => $media->getHeight()
]
]
]

],
"preview" => $preview_url
];
}
}, $medias);

$segments = array_filter($publication->getAttachments(), function (xoctAttachment $attachment) {
Expand Down
8 changes: 7 additions & 1 deletion classes/Request/class.xoctRequest.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -438,7 +438,13 @@ public function agents() {
*/
public function scheduling() {
$this->checkBranch(array( self::BRANCH_EVENTS ));
$this->addPart('scheduling');

if (xoct::isApiVersionGreaterThan('v1.1.0')){
$this->addPart('scheduling');
}
else{
$this->addPart('scheduling.json');
}

return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions js/paella_player/config/config.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,8 +21,8 @@
{ "factory":"ChromaVideoFactory", "enabled": false },
{ "factory":"WebmVideoFactory", "enabled": true },
{ "factory":"Html5VideoFactory", "enabled": true },
{ "factory":"MpegDashVideoFactory", "enabled": false },
{ "factory":"HLSVideoFactory", "enabled": false },
{ "factory":"MpegDashVideoFactory", "enabled": true },
{ "factory":"HLSVideoFactory", "enabled": true },
{ "factory":"RTMPVideoFactory", "enabled": true },
{ "factory":"ImageVideoFactory", "enabled": true },
{ "factory":"YoutubeVideoFactory", "enabled": false },
Expand Down
2 changes: 1 addition & 1 deletion js/paella_player/javascript/paella_player.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions lang/ilias_de.lang
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,9 @@ config_curl#:#cURL
config_curl_debug_level#:#Debug-Level
config_curl_password#:#API-Passwort
config_curl_username#:#API-Benutzername
config_streaming#:#Streaming
config_streaming_url#:#Wowza URL
config_use_streaming#:#Benutze Streaming URLs
config_editor_link#:#Link zum OpenCast-Video-Editor
config_editor_link_info#:#Als Platzhalter kann &#123event_id} verwendet werden. Bsp: https://myopencast.com/external-url/events/&#123event_id}/editor
config_eula#:#Nutzungsvereinbarung
Expand DownExpand Up@@ -61,6 +64,8 @@ config_audio_allowed_info#:#Wenn aktiviert, können neben Video-Dateien auch Aud
config_curl_username_info#:#Benutzeraccount in OpenCast, der zur Kommunikation über die API genutzt wird (benötigt genügend Rechte in OC)
config_curl_password_info#:#Passwort zum oben angegebenen Account.
config_curl_debug_level_info#:#Detaillierungsgrad der Einträge im Log.
config_streaming_url_info#:#Wowza URL für adaptive streaming. Bsp: https://wowza.myopencast.com:8090/opencast-engage
config_use_streaming_info#:#Wenn aktive werden die MP4 Streams aus der API durch passende Streaming URLs ersetzt
config_activate_cache_info#:#Verbessert die Ladezeiten der Videolisten durch lokales Speichern. Kann vorübergehend zu falschen (nicht aktuellen) Metadaten führen.
config_use_modals_info#:#Wenn aktiviert: Beim Abspielen von Videos wird kein neues Browserfenster geöffnet, sondern der Player wird im aktuellen Fenster angezeigt.
config_workflow_info#:#ID des workflows, welcher nach dem Hochladen eines Videos in OpenCast angewendet wird.
Expand Down
5 changes: 5 additions & 0 deletions lang/ilias_en.lang
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,9 @@ config_curl#:#cURL
config_curl_debug_level#:#Debug-Level
config_curl_password#:#API-Password
config_curl_username#:#API-Username
config_streaming#:#Streaming
config_streaming_url#:#Wowza URL
config_use_streaming#:#Benutze Streaming URLs
config_editor_link#:#Link to OpenCast Video Editor
config_editor_link_info#:#The placeholder &#123event_id} can be used. E.g.: https://myopencast.com/external-url/events/&#123event_id}/editor
config_eula#:#EULA
Expand DownExpand Up@@ -61,6 +64,8 @@ config_audio_allowed_info#:#Allows the upload of audio files.
config_curl_username_info#:#User account in OpenCast which will be used to communicate over the API (needs enough permissions in OC).
config_curl_password_info#:#Password for above account.
config_curl_debug_level_info#:#Level of detail for log entries.
config_streaming_url_info#:#Wowza URL for adaptive streaming. E.g.: https://wowza.myopencast.com:8090/opencast-engage
config_use_streaming_info#:#If active all mp4 files will be replaced by streaming urls
config_activate_cache_info#:#Improves the loading time for event lists by storing events locally. Can lead to temporarily corrupt metadata.
config_use_modals_info#:#When active: the video player will not be opened in a seperate window but in a overlaying "Modal" window.
config_workflow_info#:#ID of the workflow which will be executed in OpenCast after uploading an event.
Expand Down