Skip to content

Commit

Permalink
MED-100: Fix Video Time resource url
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Thies committed May 17, 2024
1 parent c6853b4 commit 4a6c09d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion source/videotime/classes/form/edit_resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ public function definition_after_data() {
if ($record) {
$resource = new media_resource($record);

$videourl = $resource->video_url($OUTPUT);

$content = [
'poster' => $resource->image_url($OUTPUT),
'elementid' => 'video-' . uniqid(),
'instance' => json_encode([
'vimeo_url' => $resource->video_url($OUTPUT),
'vimeo_url' => $videourl,
'controls' => true,
'responsive' => true,
'playsinline' => false,
Expand Down
2 changes: 0 additions & 2 deletions source/videotime/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function mediatimesrc_videotime_pluginfile($course, $cm, $context, $filearea, $a
])
) {
$itemid = array_shift($args);
$contenthash = array_shift($args);

$relativepath = implode('/', $args);

Expand All @@ -59,7 +58,6 @@ function mediatimesrc_videotime_pluginfile($course, $cm, $context, $filearea, $a
if (
(!$file = $fs->get_file_by_hash(sha1($fullpath)))
|| $file->is_directory()
|| $file->get_contenthash() != $contenthash
) {
return false;
}
Expand Down

0 comments on commit 4a6c09d

Please sign in to comment.