]> _ Git - fluidbook_tools.git/commitdiff
wait #7113 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 8 Oct 2024 09:45:32 +0000 (11:45 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 8 Oct 2024 09:45:32 +0000 (11:45 +0200)
src/Links/AudioLink.php

index ef24d8f7548a5f9df2de799d88efadc1b5dabee7..1fc70f17cc8fa044f4a59f56894664604e2be636 100644 (file)
@@ -49,8 +49,15 @@ class AudioLink extends Link
         if ($linkDatas->video_loop) {
             $res .= 'loop ';
         }
-        if ($linkDatas->video_auto_start) {
-            $res .= 'autoplay ';
+        switch ($linkDatas->video_auto_start) {
+            case 0:
+                break;
+            case 1:
+                $res .= 'autoplay ';
+                break;
+            default:
+                $res .= 'data-autoplay="' . $linkDatas->video_auto_start . '" ';
+                break;
         }
         $res .= ' src="' . self::getUniversalLocation($linkDatas->to) . '"';
         $res .= '></audio>';