jwplayer / jwplayer-react-native

MIT License
32 stars 9 forks source link

[IMPLEMENT] Expose more captions callbacks and events #99

Closed edougher closed 1 month ago

edougher commented 1 month ago

What does this Pull Request do?

Adds (3)three additional captions events:

  1. getCurrentCaptions: Returns index of current caption.
  2. onCaptionsChanged: Fires when the caption track has changed. Returns index of current caption.
  3. onCaptionsList: Fires when the caption tracks become available. Returns current index of caption in use. -1 if no caption is being used. Also returns an array of captions.

Why is this Pull Request needed?

Provides developer greater visibility/control of the Captions feature.

Are there any points in the code the reviewer needs to double check?

No

Are there any Pull Requests open in other repos which need to be merged with this?

No

Addresses Issue(s):

GitHub Issue