[vlc-commits] [Git][videolan/vlc][master] Allow configuring mobile controller UI skip duration (fixes #26704)
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu May 18 07:47:15 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
e8b42d40 by Kerrick Staley at 2023-05-18T07:28:45+00:00
Allow configuring mobile controller UI skip duration (fixes #26704)
- - - - -
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
=====================================
@@ -439,6 +439,7 @@ getstatus = function (includecategories)
s.apiversion=4
s.version=vlc.misc.version()
s.volume=vlc.volume.get()
+ s.seek_sec = vlc.config.get("short-jump-size")
s.time = vlc.player.get_time() / 1000000
s.position = vlc.player.get_position()
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e8b42d40867347ca5298351e28c3e69387dcf4ee
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/e8b42d40867347ca5298351e28c3e69387dcf4ee
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list