enableControls
&
disableControls
Enables and disables controls within a player.
This only affects user interaction. When a controls is disabled, the pointer (mouse, touch, etc) will have no affect, however the control will display and/or animate normally.
For example, the playlist can be scrolled, but not clicked on. Or the timeline (scrubber) will advance showing the position, but the user won't be able to "scrub" the timeline.
Here's a list of control names you can choose to enable or disable. These names are CASE-SENSATIVE.
- * play
- * pause
- * coverPlayPause
- * stop
- * next
- * previous
- * screenPlayPause
- * scrubber (the player's timeline)
- fullscreen
- random
- help
- loop
- mute
- volume
- volumeKnob
- back
- * playlist
- playlistScrollUp
- playlistScrollDown
- playlistScroll
* Items are part of the default "Play Controls Group"
You can also enable or disable any custom Rube you've included in your skin. Use the "id" of the object.
Play Controls Group
These controls can cause the player to launch or stop a track. You can modify which controls are included in this group by editing the Global Option named "mainPlayControls" .
enableControls(controlNames)
disableControls(controlNames)
Parameters
controlNames string (optional)
A comma-delimited list of controls to disable.
If this is not defined, all controls in the Play Controls Group will become enabled / disabled.
Return Value
none
See Also
- disableControls (player option)
- Defining Global Options
- getSkinElement
- JBEEB Object
Examples
Example 1
Disables all "play ccontrol" controls.
myPlayer.disableControls();
Example 2
Enables all controls. (Same as example 2, but no arguments)
myPlayer.enableControls();
Example 3
Disables a few controls.
myPlayer.disableControls("next,previous,playlist,scrubber");
Example 4
Enables a few controls.
myPlayer.enableControls("next,previous,playlist,scrubber");