Skip to content

Commit

Permalink
Merge pull request #226 from bitmovin/add-sourceconfig-description-pr…
Browse files Browse the repository at this point in the history
…operty

Add `SourceConfig`s `description` property
  • Loading branch information
rolandkakonyi authored Sep 7, 2023
2 parents 2b1f11b + 269aec9 commit a5d2cee
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions ios/RCTConvert+BitmovinPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 4 additions & 0 deletions src/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit a5d2cee

Please sign in to comment.