Skip to content

Commit

Permalink
Merge pull request #231 from THEOplayer/feature/android_cue_track_uid
Browse files Browse the repository at this point in the history
Feature/android cue track uid
  • Loading branch information
tvanlaerhoven authored Dec 7, 2023
2 parents 5492f6b + 3ce3c0f commit b29222b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Fixed an issue on Android where `EnterCue` and `ExitCue` text track events did not contain the `trackUid` property.

## [3.2.0] - 23-11-29

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions android/src/main/java/com/theoplayer/PlayerEventEmitter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,14 @@ class PlayerEventEmitter internal constructor(
}

private val onTextTrackEnterCue = EventListener<EnterCueEvent> { event ->
val payload = PayloadBuilder().textTrackCue(event.cue, null /*TODO*/).build().apply {
val payload = PayloadBuilder().textTrackCue(event.cue, event.track).build().apply {
putInt(EVENT_PROP_TYPE, TextTrackCueEventType.ENTER_CUE.type)
}
receiveEvent(EVENT_TEXTTRACK_EVENT, payload)
}

private val onTextTrackExitCue = EventListener<ExitCueEvent> { event ->
val payload = PayloadBuilder().textTrackCue(event.cue, null /*TODO*/).build().apply {
val payload = PayloadBuilder().textTrackCue(event.cue, event.track).build().apply {
putInt(EVENT_PROP_TYPE, TextTrackCueEventType.EXIT_CUE.type)
}
receiveEvent(EVENT_TEXTTRACK_EVENT, payload)
Expand Down

0 comments on commit b29222b

Please sign in to comment.