Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/texttrack with initial cues #471

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Fixed a memory leak on iOS, where the presentationModeManager was holding a strong reference to the fullscreen's target and return views
- Fixed an issue on iOS where the destruction of the THEOplayerView was not always propagated correctly over the iOS Bridge, resulting in an occasional memory leak.
- Fixed an issue where, when requesting a text track's cues, the time properties would sometimes be in seconds instead of milliseconds.

## [8.11.1] - 24-12-18

Expand Down
8 changes: 4 additions & 4 deletions src/internal/adapter/WebEventForwarder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
VolumeChangeEvent as NativeVolumeChangeEvent,
DimensionChangeEvent as NativeDimensionChangeEvent,
} from 'theoplayer';
import type { AdEvent, MediaTrack, TextTrack, TimeRange } from 'react-native-theoplayer';
import type { AdEvent, MediaTrack, TimeRange } from 'react-native-theoplayer';
import {
AdEventType,
CastState,
Expand Down Expand Up @@ -267,7 +267,7 @@ export class WebEventForwarder {
track.addEventListener('removecue', this.onRemoveTextTrackCue(track));
track.addEventListener('entercue', this.onEnterTextTrackCue(track));
track.addEventListener('exitcue', this.onExitTextTrackCue(track));
this._facade.dispatchEvent(new DefaultTextTrackListEvent(TrackListEventType.ADD_TRACK, track as TextTrack));
this._facade.dispatchEvent(new DefaultTextTrackListEvent(TrackListEventType.ADD_TRACK, fromNativeTextTrack(track)));
};

private readonly onRemoveTextTrack = (event: RemoveTrackEvent) => {
Expand All @@ -276,11 +276,11 @@ export class WebEventForwarder {
track.removeEventListener('removecue', this.onRemoveTextTrackCue(track));
track.removeEventListener('entercue', this.onEnterTextTrackCue(track));
track.removeEventListener('exitcue', this.onExitTextTrackCue(track));
this._facade.dispatchEvent(new DefaultTextTrackListEvent(TrackListEventType.REMOVE_TRACK, track as NativeTextTrack as TextTrack));
this._facade.dispatchEvent(new DefaultTextTrackListEvent(TrackListEventType.REMOVE_TRACK, fromNativeTextTrack(track)));
};

private readonly onChangeTextTrack = (event: TrackChangeEvent) => {
this._facade.dispatchEvent(new DefaultTextTrackListEvent(TrackListEventType.CHANGE_TRACK, event.track as NativeTextTrack as TextTrack));
this._facade.dispatchEvent(new DefaultTextTrackListEvent(TrackListEventType.CHANGE_TRACK, fromNativeTextTrack(event.track as NativeTextTrack)));
};

private readonly onAddAudioTrack = (event: AddTrackEvent) => {
Expand Down
Loading