]> git.parisson.com Git - teleforma.git/commitdiff
fix video player
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sun, 19 Jan 2025 11:04:11 +0000 (12:04 +0100)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Sun, 19 Jan 2025 11:06:19 +0000 (12:06 +0100)
teleforma/templates/teleforma/seminar_media_video.html

index 9afaab8dcc2cf631a060920fccd164b846263ea1..2fe087d2d6015205990cf3f9eec4a3cf95e6f64d 100644 (file)
@@ -118,12 +118,24 @@ $(window).ready(function(){
     <script src="https://vjs.zencdn.net/7.11.4/video.min.js"></script>
     <script src="https://cdn.jsdelivr.net/npm/videojs-seek-buttons/dist/videojs-seek-buttons.min.js"></script>
     <script>
-      var player = videojs('my_video_1');
+        var player = videojs('my_video_1');
+
+        player.seekButtons({
+            forward: 10,
+            back: 10
+        });
+
+        // jump to time offset action using Media Fragments
+        function jumpToTimeoffset(time) {
+            var Player = videojs("my_video_1");
+            Player.currentTime(time);
+            Player.play();
+        }
+
+        $(document).ready(function(){
+            $('#my_video_1').bind('contextmenu',function() { return false; });
+        });
 
-      player.seekButtons({
-        forward: 10,
-        back: 10
-      });
     </script>
 </div>
 {% endif %}
@@ -175,22 +187,6 @@ $(window).ready(function(){
   </ul>
  </div>
 </div>
-
-<script type="text/javascript">
-
-// jump to time offset action using Media Fragments
-function jumpToTimeoffset(time) {
-    var Player = _V_("my_video_1");
-    Player.currentTime(time);
-    Player.play();
-}
-
-$(document).ready(function(){
-    $('#my_video_1').bind('contextmenu',function() { return false; });
-});
-
-</script>
-
 {% endblock index %}
 
 {% block module-action-right %}