Skip to content

Commit

Permalink
Merge pull request #403 from THEOplayer/release/v8.2.2
Browse files Browse the repository at this point in the history
Release/v8.2.2
  • Loading branch information
wvanhaevre authored Sep 28, 2024
2 parents d6f5ff5 + d482c2a commit fbafdcd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [8.2.2] - 24-09-28

- Fixed a build issue on iOS for applications that run without the GOOGLE_IMA feature flag

## [8.2.1] - 24-09-27

### Fixed
Expand Down
22 changes: 19 additions & 3 deletions ios/ads/THEOplayerRCTView+AdsConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import GoogleInteractiveMediaAds

struct AdsConfig {
var adSUIEnabled: Bool = true
var adsImaConfig = AdsImaConfig()
var adsImaConfig = AdsImaConfig(maxRedirects: 4, enableDebugMode: false)
var allowedMimeTypes: [String]?
}

Expand All @@ -20,7 +20,21 @@ struct AdsImaConfig {
var featureFlags: [String:String]?
var autoPlayAdBreaks: Bool?
var sessionID: String?
var bitrate: Int = kIMAAutodetectBitrate
var bitrate: Int

init(maxRedirects: UInt, enableDebugMode: Bool, ppid: String? = nil, featureFlags: [String : String]? = nil, autoPlayAdBreaks: Bool? = nil, sessionID: String? = nil, bitrate: Int? = -1) {
self.maxRedirects = maxRedirects
self.enableDebugMode = enableDebugMode
self.ppid = ppid
self.featureFlags = featureFlags
self.autoPlayAdBreaks = autoPlayAdBreaks
self.sessionID = sessionID
#if canImport(THEOplayerGoogleIMAIntegration)
self.bitrate = bitrate ?? kIMAAutodetectBitrate
#else
self.bitrate = bitrate ?? -1
#endif
}
}

#if os(iOS)
Expand Down Expand Up @@ -50,7 +64,9 @@ extension THEOplayerRCTView {
if let enableDebugMode = adsImaConfig["enableDebugMode"] as? Bool {
self.adsConfig.adsImaConfig.enableDebugMode = enableDebugMode
}
self.adsConfig.adsImaConfig.bitrate = adsImaConfig["bitrate"] as? Int ?? kIMAAutodetectBitrate
if let bitrate = adsImaConfig["bitrate"] as? Int {
self.adsConfig.adsImaConfig.bitrate = bitrate
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-theoplayer",
"version": "8.2.1",
"version": "8.2.2",
"description": "A THEOplayer video component for react-native.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down

0 comments on commit fbafdcd

Please sign in to comment.