Skip to content

Commit

Permalink
Add lockScreenControlConfig.isEnabled converters
Browse files Browse the repository at this point in the history
  • Loading branch information
123mpozzi committed Oct 7, 2024
1 parent 4f89231 commit 8e10b3d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ios/RCTConvert+BitmovinPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ extension RCTConvert {
if let networkConfig = RCTConvert.networkConfig(json["networkConfig"]) {
playerConfig.networkConfig = networkConfig
}
if let nowPlayingConfig = RCTConvert.lockScreenControlConfig(json["lockScreenControlConfig"]) {
playerConfig.nowPlayingConfig = nowPlayingConfig
}
#if os(iOS)
if let remoteControlConfig = RCTConvert.remoteControlConfig(json["remoteControlConfig"]) {
playerConfig.remoteControlConfig = remoteControlConfig
Expand Down Expand Up @@ -1328,6 +1331,17 @@ extension RCTConvert {
"body": toJson(data: httpResponse.body)
]
}

static func lockScreenControlConfig(_ json: Any?) -> NowPlayingConfig? {
guard let json = json as? [String: Any?] else {
return nil
}
let nowPlayingConfig = NowPlayingConfig()
if let isEnabled = json["isEnabled"] as? Bool {
nowPlayingConfig.isNowPlayingInfoEnabled = isEnabled
}
return nowPlayingConfig
}
}
/**
* React native specific PlayerViewConfig.
Expand Down

0 comments on commit 8e10b3d

Please sign in to comment.