]> _ Git - cubeextranet.git/commitdiff
Add Vimeo support for web videos in the compiler. WIP #1449 @0:15
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 6 Jun 2017 13:12:01 +0000 (13:12 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 6 Jun 2017 13:12:01 +0000 (13:12 +0000)
inc/ws/Util/html5/html5video/class.ws.html5.links.php

index 1b1e652a09a0d1a975748716a98af5f9f64cffc8..ac8fdfb2eb103fdada3938990e982f54f8729a30 100644 (file)
@@ -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() {