Constructor
new module:caplin/sljsadapter/watchlist/StreamLinkWatchlist()
Methods
-
getContentsManager() → {module:caplin/watchlist/WatchlistContentsManager}
-
Creates and returns a
module:caplin/watchlist/WatchlistContentsManager
for this watchlist. Only when this method is called for the first time will an actual streamlink subscription to the watchlist's subject be created.Returns:
may be used to modify the watchlist contents. -
getId() → {string}
-
Returns the unique ID of the watchlist.
- Implements:
Returns:
ID- Type
- string
-
getName() → {string}
-
Returns the display name of the watchlist.
- Implements:
Returns:
display name- Type
- string
-
getSubject() → {string}
-
Returns the streamlink subject for the watchlist's record.
- Implements:
Returns:
streamlink subject- Type
- string
-
setName(name, erroropt, successopt)
-
Makes streamlink contrib to set the name of the watchlist and add the request to list of pending requests. Calls success callback when streamlink changes the name. If the name hasn't been changed after the timeout, error is called.
Parameters:
Name Type Attributes Description name
String the watchlist name to be set error
function <optional>
function to be called if operation fails success
function <optional>
function to be called if operation succeeds - Implements:
- See:
Throws:
-
If name argument is not a string.
-
setPosition(position, erroropt, successopt)
-
Send a StreamLink contrib to set the position of the watchlist and add the request to list of pending requests. Call success callback when streamlink changes the position. Call error if the position hasn't changed after the configured timeout.
Parameters:
Name Type Attributes Description position
integer the watchlist position index (0 based) error
function <optional>
function to be called if operation fails success
function <optional>
function to be called if operation succeeds - Implements:
- See:
Throws:
-
If position argument is not an integer.