Skip to content
Snippets Groups Projects
Commit 9d72c61d authored by Justus Dieckmann's avatar Justus Dieckmann
Browse files

Prevent error if there is no stream in the episode.json

parent 66f52cf6
Branches
No related tags found
No related merge requests found
...@@ -134,7 +134,7 @@ class filter_opencast extends moodle_text_filter { ...@@ -134,7 +134,7 @@ class filter_opencast extends moodle_text_filter {
$mustachedata->height = $height; $mustachedata->height = $height;
$mustachedata->modplayerpath = (new moodle_url('/mod/opencast/player.html'))->out(); $mustachedata->modplayerpath = (new moodle_url('/mod/opencast/player.html'))->out();
if (count($data['streams']) === 1) { if (isset($data['streams']) && count($data['streams']) === 1) {
$sources = $data['streams'][0]['sources']; $sources = $data['streams'][0]['sources'];
$res = $sources[array_key_first($sources)][0]['res']; $res = $sources[array_key_first($sources)][0]['res'];
$resolution = $res['w'] . '/' . $res['h']; $resolution = $res['w'] . '/' . $res['h'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment