1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-01 12:05:46 +01:00

Add 'repeat' and 'shuffle'.

This commit is contained in:
Doug Kearns
2009-04-02 23:51:42 +11:00
parent 04c999f993
commit a5e62a9bcf
4 changed files with 50 additions and 0 deletions

View File

@@ -75,6 +75,33 @@ function Player() // {{{
gMM.removeListener(mediaCoreListener);
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
options.add(["repeat"],
"Set the playback repeat mode",
"number", 0,
{
setter: function (value) gMM.sequencer.repeatMode = value,
getter: function () gMM.sequencer.repeatMode,
completer: function (context) [
["0", "Repeat none"],
["1", "Repeat one"],
["2", "Repeat all"]
],
validator: Option.validateCompleter
});
options.add(["shuffle"],
"Play tracks in shuffled order",
"boolean", false,
{
setter: function (value) value ? gMM.sequencer.mode = gMM.sequencer.MODE_SHUFFLE :
gMM.sequencer.mode = gMM.sequencer.MODE_FORWARD,
getter: function () gMM.sequencer.mode == gMM.sequencer.MODE_SHUFFLE
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// MAPPINGS ////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{