[IMPLEMENT] Expose more captions callbacks and events
Closed this issue · 2 comments
Jmilham21 commented
What needs to be implemented
Expose:
- ...the native event for
onCaptionsChanged
/onCaptionsList
(Android), and jwplayer(_:captionTrackChanged:) / jwplayer(_:updatedCaptionList:) (iOS) need to be exposed in JS. - ...the
getCurrentCaptions
function (Android) / currentCaptionsTrack property (iOS).
How should it be implemented
- Follow convention and pass the native event to the JS with the values from the Native Event.
- Follow convention for adding a bridged callback to native SDKs in JS.
Acceptance Criteria
- Native events are bubbled to the JS
- The new events are defined in
index.js
andindex.d.ts
- iOS and Android are both covered
- Add function for
getCurrentCaptions
in JS / Native - Add demo of this in
Example
app OR inREADME.md
- This is now optional. We will update our props and callback list soon
Additional context
If there are any other captions events or helper functions you see, feel free to implement.
Jmilham21 commented
It'd be worth considering the onCaptionText
event as well. This is helpful for those who want to render captions outside of the player.