TRUE]); if ($fallback === TRUE) { $sources[] = (object)[ 'type' => 'video/mp4', 'src' => url($modulePath . '/assets/videos/mkbh_video_processing.mp4', ['absolute' => TRUE]), ]; $sources[] = (object)[ 'type' => 'video/webm', 'src' => url($modulePath . '/assets/videos/mkbh_video_processing.webm', ['absolute' => TRUE]), ]; } else { if (!empty($video['thumbnailfile'])) { $poster = file_create_url($video['thumbnailfile']->uri); } foreach ($video['playablefiles'] as $video_file) { $sources[] = (object)[ 'type' => $video_file->filemime, 'src' => file_create_url($video_file->uri), ]; } } $vars['poster'] = $poster; $vars['sources'] = $sources; }