Class minplayer.async
This class keeps track of asynchronous get requests for certain
variables within the player.
Defined in: minplayer.async.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The queue of callbacks to call when this value is determined.
|
|
The final value of this asynchronous variable.
|
Method Attributes | Method Name and Description |
---|---|
get(callback, pollValue)
Retrieve the value of this variable.
|
|
set(val)
Sets the value of an asynchronous value.
|
Field Detail
queue
The queue of callbacks to call when this value is determined.
value
The final value of this asynchronous variable.
Method Detail
get(callback, pollValue)
Retrieve the value of this variable.
- Parameters:
- {function} callback
- The function to call when the value is determined.
- {function} pollValue
- The poll function to try and get the value every 1 second if the value is not set.
set(val)
Sets the value of an asynchronous value.
- Parameters:
- {void} val
- The value to set.