How to select videos
For the most of the methods below, you need to specify which videos to control.
There are various ways to select videos.
Options:
Name | Type | Description |
---|---|---|
index |
integer | Single index of video |
all |
null | all | All the videos |
list |
Array.<integer> | Indices of videos |
not |
not(indices) | All except indices. See not() |
expression |
string | Condition text (e.g. ">3" or "%2==0") |
Methods
add(addRow, addCol, id)
Add columns and rows to the grid
Parameters:
Name | Type | Description |
---|---|---|
addRow |
integer | number of rows to add. |
addCol |
integer | number of columns to add. |
id |
string | YouTube identifier. |
create(row, col, id)
Create a grid
Parameters:
Name | Type | Description |
---|---|---|
row |
integer | number of rows to create. |
col |
integer | number of columns to create. |
id |
string | YouTube identifier. |
cue(videos, id, cancelloop)
Replace the selected videos with id.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
id |
string | YouTube identifier. |
cancelloop |
bool | To cancel the loop that may have been set earlier. |
delay(videos, interval)
Delay
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
interval |
integer | interval |
fadeIn(videos, duration)
Start playing the selected videos with increasing volume.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
duration |
integer | Duration of time in seconds. |
fadeOut(videos, duration)
Fade out the volume of selected videos.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
duration |
integer | Duration of time in seconds. |
jump(videos, num, phase)
Jump
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
num |
integer | num |
phase |
integer | phase |
loop(videos, back, interval, phase)
Loop
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
back |
integer | back |
interval |
integer | interval |
phase |
integer | phase |
loopAt(videos, atTime, interval, phase)
LoopAt
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
atTime |
integer | atTime |
interval |
integer | interval |
phase |
integer | phase |
mute(videos, mute)
mute/unMute the selected videos.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
mute |
bool | true = mute / false = unMute. |
not(indices)
Returns an array of video index that excludes the specified video index.
e.g. if the current grid is 3X3.
not(1) returns [0,2,3,4,5,6,7,8]
e.g. if the current grid is 4X4.
not(8,7) returns [0,1,2,3,4,5,6,9,10,11,12,13,14,15]
Parameters:
Name | Type | Description |
---|---|---|
indices |
Array.<integer> | Indices to exclude. |
pause(videos)
Pause the selected videos
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
phase(videos, interval)
Phase
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
interval |
integer | interval |
play(videos)
Play the selected videos
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
search(query)
Search YouTube. Selecto item on the right of the screen to get the YouTube identifier text.
Parameters:
Name | Type | Description |
---|---|---|
query |
string | Query to search. |
seek(videos, seconds)
Seek to specified time.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
seconds |
integer | time in seconds. |
setQ(videos, quality)
Play the selected videos
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
quality |
string | small, medium, large, hd720, hd1080, highres, or default. |
speed(videos, newSpeed)
Change playback speed of the selected videos.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
newSpeed |
float | New speed. |
sync(videos, index)
Sync
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
index |
integer | index |
turnup(videos, diff)
Increase (or decrease) volume of the selected videos.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
diff |
integer | To decrease volume, pass negative number. |
unloop(videos)
Unloop
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
volume(videos, vol)
Set volume of the selected videos.
Parameters:
Name | Type | Description |
---|---|---|
videos |
select | See how to select videos. |
vol |
integer | New volume. (0 ~ 100) |