setPlaylist( [Audio Mix] | [Video Mix] | [Media Mix] )
Miaow audio: add( {Bubble} | | {Tempered Song} | {Lentement} )
The Stark Palace audio: add( {Cro Magnon Man} | {Your Face} | {Cyber Sonnet} )
Various video: add( {Big Buck Bunny} | {Incredibles} | {Finding Nemo} )
remove( -2 | -1 | 0 | 1 | 2 )
| shuffle( false | true )
select( -2 | -1 | 0 | 1 | 2 )
| next()
| previous()
play( -2 | -1 | 0 | 1 | 2 )
| pause()
option( "autoPlay", false | true )
Default: false
option( "enableRemoveControls", false | true )
Default: false
option( "displayTime", 0 | 'fast' | 'slow' | 2000 )
Default: 'slow'
option( "addTime", 0 | 'fast' | 'slow' | 2000 )
Default: 'fast'
option( "removeTime", 0 | 'fast' | 'slow' | 2000 )
Default: 'fast'
option( "shuffleTime", 0 | 'fast' | 'slow' | 2000 )
Default: 'slow'
Equivalent Effect: add(Your Face, true)
== add(Your Face) then play(-1)
Avoid code like: remove(2) then remove(3)
Because the second command will only work if the remove animation time, removeTime
, is zero.
Even then, it will look like it removes the 3rd and 5th items from the original playlist before both commands executed.
This is because the remove(2)
removes the 3rd item and then remove(3)
removes the 4th item, which was the 5th item before the 3rd item was removed.
To remove the 3rd and 4th items, you'd use remove(2)
and then remove(2)
again.
The remove()
method returns a true
when successful, a false
when ignored, which allows you to know whether it worked or not.