Skip to content

Commit

Permalink
Merge pull request #339 from bitmovin/fix-source-events-loadingstate-…
Browse files Browse the repository at this point in the history
…mapping

Fix `loadingState` missing in source events on iOS and tvOS
  • Loading branch information
rolandkakonyi authored Nov 30, 2023
2 parents 7fda4b6 + fe9c38b commit 75a40c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- iOS: `onEvent` on iOS has incomplete payload information
- tvOS: Picture in Picture sample screen has unwanted padding
- iOS: hide home indicator when entering fullscreen mode in the example application
- iOS: invalid `loadingState` value in `SeekEvent`, `SourceLoadEvent`, `SourceLoadedEvent` and in `SourceUnloadedEvent`

## [0.14.1] (2023-11-16)

Expand Down
2 changes: 1 addition & 1 deletion ios/Event+JSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extension Source {
var json: [AnyHashable: Any] = [
"duration": duration,
"isActive": isActive,
"loadingState": loadingState,
"loadingState": loadingState.rawValue,
"isAttachedToPlayer": isAttachedToPlayer
]
if let metadata {
Expand Down
5 changes: 5 additions & 0 deletions src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { SubtitleTrack } from './subtitleTrack';
import { VideoQuality } from './media';
import { AudioTrack } from './audioTrack';
import { LoadingState } from './source';

/**
* Base event type for all events.
Expand Down Expand Up @@ -139,6 +140,10 @@ export interface EventSource {
* Metadata for this event's source.
*/
metadata?: Record<string, any>;
/**
* The current `LoadingState` of the source.
*/
loadingState: LoadingState;
}

/**
Expand Down

0 comments on commit 75a40c4

Please sign in to comment.