Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
25ac0d4e by Kerrick Staley at 2023-06-11T14:53:17-04:00
Allow configuring mobile controller UI skip duration (fixes #26704)

(cherry picked from commit e8b42d40867347ca5298351e28c3e69387dcf4ee)

- - - - -


3 changed files:

- share/lua/http/js/controllers.js
- share/lua/http/mobile.html
- share/lua/intf/modules/httprequests.lua


Changes:

=====================================
share/lua/http/js/controllers.js
=====================================
@@ -2,6 +2,7 @@ var currentArt = null;
 var current_que = 'main';
 var current_playlist_id = -1;
 var previous_playlist_id = -1;
+var seek_sec = 0;
 
 function updateArt(url) {
     $('#albumArt').fadeOut(500, function () {
@@ -80,6 +81,8 @@ function updateStatus() {
                     previous_playlist_id = current_playlist_id;
                 }
 
+                seek_sec = parseInt($('seek_sec', data).text());
+
                 if (pollStatus) {
                     setTimeout(updateStatus, 1000);
                 }


=====================================
share/lua/http/mobile.html
=====================================
@@ -63,11 +63,11 @@
                                        return false;
                                });
                 $('#buttonRewd').click(function(){
-                    sendCommand({'command': 'seek', 'val': '-30S'});
+                    sendCommand({'command': 'seek', 'val': '-' + 
seek_sec.toString() + 'S'});
                     return false;
                 });
                 $('#buttonFwrd').click(function(){
-                    sendCommand({'command': 'seek', 'val': '+30S'});
+                    sendCommand({'command': 'seek', 'val': '+' + 
seek_sec.toString() + 'S'});
                     return false;
                 });
                        })


=====================================
share/lua/intf/modules/httprequests.lua
=====================================
@@ -470,6 +470,7 @@ getstatus = function (includecategories)
     s.apiversion=3
     s.version=vlc.misc.version()
     s.volume=vlc.volume.get()
+    s.seek_sec = vlc.config.get("short-jump-size")
 
     if input then
         s.time=math.floor(vlc.var.get(input,"time") / 1000000)



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/25ac0d4e5dc50721411eb896d444d79bcf258780

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/25ac0d4e5dc50721411eb896d444d79bcf258780
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to