An interface to standardize how objects are destroyed.
- Implementations:
- shaka.cast.CastProxy
- shaka.cast.CastReceiver
- shaka.cast.CastSender
- shaka.media.DrmEngine
- shaka.media.GapJumpingController
- shaka.media.MediaSourceEngine
- shaka.media.Playhead
- shaka.media.PlayheadObserver
- shaka.media.SegmentIndex
- shaka.media.StreamingEngine
- shaka.media.Transmuxer
- shaka.media.VideoWrapper
- shaka.net.NetworkingEngine
- shaka.offline.DownloadManager
- shaka.offline.Storage
- shaka.offline.StorageMuxer
- shaka.offline.StorageMuxer
- shaka.Player
- shaka.text.TextEngine
- shaka.util.EventManager
- Source:
Methods
(static) with(objsnon-null, callback) → (non-null) {Promise.<T>}
A helper function that will destroy a group of destroyable object once the
callback (and its promises) complete. The destroyable object will be
destroyed regardless of whether or not the callback (and its promises) get
resolved or rejected.
Parameters:
Name | Type | Description |
---|---|---|
objs |
Array.<!shaka.util.IDestroyable> | A list of destroyable object that should be destroyed after the callback completes. |
callback |
function(): (!Promise.<T>|function(): T) |
- Source:
Returns:
- Type
- Promise.<T>
(export) destroy() → (non-null) {Promise}
Destroys the object, releasing all resources and shutting down all
operations. Returns a Promise which is resolved when destruction is
complete. This Promise should never be rejected.
- Source:
Returns:
- Type
- Promise