From: stephen@cubedesigners.com Date: Tue, 6 Jun 2017 13:12:01 +0000 (+0000) Subject: Add Vimeo support for web videos in the compiler. WIP #1449 @0:15 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a610cb970316c9e02c144c7a107acf98698e764f;p=cubeextranet.git Add Vimeo support for web videos in the compiler. WIP #1449 @0:15 --- diff --git a/inc/ws/Util/html5/html5video/class.ws.html5.links.php b/inc/ws/Util/html5/html5video/class.ws.html5.links.php index 1b1e652a0..ac8fdfb2e 100644 --- a/inc/ws/Util/html5/html5video/class.ws.html5.links.php +++ b/inc/ws/Util/html5/html5video/class.ws.html5.links.php @@ -713,8 +713,7 @@ class webVideoLink extends videoLink { } elseif ($this->video_service == 1) { $url = 'https://www.dailymotion.com/embed/video/' . $this->to; } elseif ($this->video_service == 2) { - //Todo: get vimeo embed URL - $url = ''; + $url = 'https://player.vimeo.com/video/' . $this->to; } elseif ($this->video_service == 3) { list($playerId, $videoId) = explode('|', $this->to); $url = 'https://link.brightcove.com/services/player/bcpid' . $playerId . '?bctid=' . $videoId . '&autoStart=false&width=100%25&height=100%25'; @@ -995,7 +994,17 @@ class webVideoPopupLink extends videoPopupLink { // } public function getURL() { - return '#/video/' . $this->to; + + switch($this->video_service) { + case 1: // Dailymotion + return '#/webvideo/dailymotion/' . $this->to; + break; + case 2: // Vimeo + return '#/webvideo/vimeo/' . $this->to; + break; + default: + return '#/video/' . $this->to; + } } public function getAdditionnalContent() {