Members
create
Create a new instance of a {module:core/abstract.MediaObject} attached to
this {module:core.MediaPipeline}
(readonly) id :external:Number
Unique identifier of this object
Type:
Methods
disguise(target, source, unthenableopt) → {Object}
Disguise an object giving it the appearance of another
Add bind'ed functions and properties to a `target` object delegating the
actions and attributes updates to the `source` one while retaining its
original personality (i.e. duplicates and `instanceof` are preserved)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
target |
Object | the object to be disguised | |
source |
Object | the object where to fetch its methods and attributes | |
unthenable |
Object |
<optional> |
the returned object should not be a thenable |
- Source:
Returns:
`target` disguised
- Type
- Object
disguiseThenable(target, source) → {thenable}
Disguise a thenable object
If available, `target.then()` gets replaced by a method that exec the
`onFulfilled` and `onRejected` callbacks using `source` as `this` object, and
return the Promise returned by the original `target.then()` method already
disguised. It also add a `target.catch()` method pointing to the newly added
`target.then()`, being it previously available or not.
Parameters:
Name | Type | Description |
---|---|---|
target |
thenable | the object to be disguised |
source |
Object | the object where to fetch its methods and attributes |
- Source:
Returns:
`target` disguised
- Type
- thenable
doGet()
Do an asynchronous HTTP GET request both on Node.js & browser
- Source:
onerror()
Set an assert error and re-start the test so it can fail
- Source:
promiseCatch(onRejectedopt) → {Promise}
Generic `Promise.catch()` method
It delegate its functionality on the `then()` of the object where it's
applied, both directly or on its class definition prototype
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
onRejected |
function |
<optional> |
- Source:
Returns:
- Type
- Promise
Timeout()
Manage timeouts in an object-oriented style
- Source:
unthenable(input) → {Object}
Return a copy of the input object without `.then()` and `.catch()`
Parameters:
Name | Type | Description |
---|---|---|
input |
thenable |
- Source:
Returns:
unthenabled input object
- Type
- Object
Type Definitions
callback(…media) → {external:Promise}
Connect the source of a media to the sink of the next one
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
media |
module:core/abstract~MediaObject |
<repeatable> |
A media to be connected |
Throws:
SyntaxError
Returns:
- Type
- external:Promise