diff --git a/web/app/Controller/EventsController.php b/web/app/Controller/EventsController.php index 50fb864ea..acd06c95d 100644 --- a/web/app/Controller/EventsController.php +++ b/web/app/Controller/EventsController.php @@ -58,6 +58,14 @@ public function index() { throw new NotFoundException(__('Invalid event')); } $this->set('event', $event); + + if (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { + $videoFormat = 'webm'; + } else { + $videoFormat = 'mp4'; + } + $this->set('videoSrc', $this->Event->createVideo( $id, $videoFormat, 100, 100 )); + } public function delete($id) {