diff --git a/CHANGELOG.md b/CHANGELOG.md index ab4c10c3..3e77293e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/ios/Event+JSON.swift b/ios/Event+JSON.swift index 0b6c817c..12b06ef5 100644 --- a/ios/Event+JSON.swift +++ b/ios/Event+JSON.swift @@ -5,7 +5,7 @@ extension Source { var json: [AnyHashable: Any] = [ "duration": duration, "isActive": isActive, - "loadingState": loadingState, + "loadingState": loadingState.rawValue, "isAttachedToPlayer": isAttachedToPlayer ] if let metadata { diff --git a/src/events.ts b/src/events.ts index c467ebf7..3f357808 100644 --- a/src/events.ts +++ b/src/events.ts @@ -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. @@ -139,6 +140,10 @@ export interface EventSource { * Metadata for this event's source. */ metadata?: Record; + /** + * The current `LoadingState` of the source. + */ + loadingState: LoadingState; } /**