LoadCaptionsService

@ListensFor(events = [])
@Emits(events = [])
open class LoadCaptionsService : AbstractComponent

Provides a simple interface to load and parse caption documents.

Constructors

Link copied to clipboard
constructor(emitter: EventEmitter, contentResolver: ContentResolver)
The LoadCaptionsService requires an EventEmitter to notify when the Captions are loaded.

Functions

Link copied to clipboard
open fun addListener(eventType: String, listener: EventListener)
Convenience method to add an EventListener for the given type using the EventEmitter.on() method.
Link copied to clipboard
open fun addOnceListener(eventType: String, listener: EventListener)
Convenience method to add an EventListener for the given type using the EventEmitter.once() method.
Link copied to clipboard
Provides a reference to the EventEmitter with which this component was initialized
Link copied to clipboard
open fun loadCaptions(uri: Uri, mimeType: String)
Asynchronously loads and parses the captions file located at the given Uri.
Link copied to clipboard
open fun removeListener(eventType: String)
Removes the specified listener from the EventEmitter.
Link copied to clipboard
open fun removeListeners()
Removes all set listeners from the EventEmitter.