Skip to content
Snippets Groups Projects
Commit 36447286 authored by Tamara Gunkel's avatar Tamara Gunkel
Browse files

use moodle url for path to mod oc player

parent ef9ef911
Branches
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ class filter_opencast extends moodle_text_filter
* @throws dml_exception
*/
public function filter($text, array $options = array()) {
global $PAGE;
global $CFG, $PAGE;
$i = 0;
if (stripos($text, '</video>') === false) {
......@@ -122,6 +122,7 @@ class filter_opencast extends moodle_text_filter
$mustachedata->data = json_encode($data);
$mustachedata->width = $width;
$mustachedata->height = $height;
$mustachedata->modplayerpath = (new moodle_url('/mod/opencast/player.html'))->out();
if (count($data['streams']) === 1) {
$sources = $data['streams'][0]['sources'];
......
......@@ -27,6 +27,7 @@
"height": "250",
"playerid": "ocplayer_0",
"configurl": "/filter/opencast/config.json",
"modplayerpath": "/mod/opencast/player.html",
"data": "{&quot;metadata&quot;:{&quot;title&quot;: &quot;Test video&quot;, &quot;etc&quot;: &quot;...&quot;}"
}
}}
......@@ -37,7 +38,7 @@
{{^resolution}}
<div class="filter-opencast player-wrapper">
{{/resolution}}
<iframe src="/mod/opencast/player.html" class="filter-player-iframe" id="{{playerid}}" allowfullscreen></iframe>
<iframe src="{{modplayerpath}}" class="filter-player-iframe" id="{{playerid}}" allowfullscreen></iframe>
</div>
<script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment