diff --git a/CHANGELOG.md b/CHANGELOG.md index 26abe762..fdfe8c96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - `Player.getAudioTrack` and `Player.getSubtitleTrack` APIs to get currently selected audio and subtitle tracks +- `SourceConfig.description` property to allow setting a description for the source ## [0.10.0] (2023-09-04) diff --git a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt index 931fad64..1a552350 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt @@ -312,6 +312,7 @@ class JsonConverter { } val config = SourceConfig(url, toSourceType(type)) config.title = json.getString("title") + config.description = json.getString("description") config.posterSource = json.getString("poster") if (json.hasKey("isPosterPersistent")) { config.isPosterPersistent = json.getBoolean("isPosterPersistent") diff --git a/ios/RCTConvert+BitmovinPlayer.swift b/ios/RCTConvert+BitmovinPlayer.swift index 7147b8ef..e9b2f900 100644 --- a/ios/RCTConvert+BitmovinPlayer.swift +++ b/ios/RCTConvert+BitmovinPlayer.swift @@ -239,6 +239,9 @@ extension RCTConvert { if let title = json["title"] as? String { sourceConfig.title = title } + if let description = json["description"] as? String { + sourceConfig.sourceDescription = description + } if let poster = json["poster"] as? String { sourceConfig.posterSource = RCTConvert.nsurl(poster) } diff --git a/src/source.ts b/src/source.ts index 134bf9ad..15e341de 100644 --- a/src/source.ts +++ b/src/source.ts @@ -95,6 +95,10 @@ export interface SourceConfig extends NativeInstanceConfig { * The title of the video source. */ title?: string; + /** + * The description of the video source. + */ + description?: string; /** * The URL to a preview image displayed until the video starts. */