The item object¶
Functions¶
onEvent(String event, Function handler)¶
Install an event handler for the specific item. If event is 'null' all events will be passed to the handler. The first argument to the handler is a string with the event name.
Deprecated in 5.0. Was available from 3.99.357
destroy()¶
Remove the item from the page
Available from 3.99.357
addOptURL(String title, String URL)¶
Add an additional URL for the item. This URL can be reached from the
item's context-menu.
Available from 3.99.357
addOptAction(String title, Function Handler)¶
Adds an additional item to the item's menu. When trigged by the user the Function Handler is called.
Available from 3.99.357
addOptSeparator(String title)¶
Add a separator that separates content by sections.
Available from 3.99.428
dump()¶
Prints the dump of the current item (Useful for debugging).
enable()¶
Enables item.
disable()¶
Disables item.
moveBefore(Integer Index)¶
Moves current item to before an item in position specified by Index in the current page.
- Index - Position of the item in which is to move current item to before of.
bindVideoMetadata(Object Metadata)¶
Binds video metadata to current item.
- Metadata - Object with metadata to associate to current item.
Current fields used are:
filename: Name of the file.
year: Year.
title: Title of the video.
season: Season number of TV Show.
episode: Episode number of TV Show.
imdb: IMDb ID of the video.
duration: Duration of the video.
unbindVideoMetadata()¶
Unbinds video metadata from the current item. (Available since 4.9.92)