From 564cf7efa18fd2685d85a220192e261e250cbf2c Mon Sep 17 00:00:00 2001 From: Roland Kakonyi Date: Thu, 12 Dec 2024 16:05:58 +0100 Subject: [PATCH] fix build issues with newer SDK versions --- BitmovinConvivaAnalytics/Classes/ConvivaAnalytics.swift | 6 ++++-- Example/Tests/Doubles/BitmovinPlayerTestDouble.swift | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/BitmovinConvivaAnalytics/Classes/ConvivaAnalytics.swift b/BitmovinConvivaAnalytics/Classes/ConvivaAnalytics.swift index 9c3eaee..886ac1b 100644 --- a/BitmovinConvivaAnalytics/Classes/ConvivaAnalytics.swift +++ b/BitmovinConvivaAnalytics/Classes/ConvivaAnalytics.swift @@ -44,8 +44,10 @@ public final class ConvivaAnalytics: NSObject { */ public var playerView: PlayerView? { didSet { - oldValue?.remove(listener: self) - playerView?.add(listener: self) + Task { @MainActor in + oldValue?.remove(listener: self) + playerView?.add(listener: self) + } } } diff --git a/Example/Tests/Doubles/BitmovinPlayerTestDouble.swift b/Example/Tests/Doubles/BitmovinPlayerTestDouble.swift index 3e990d7..b37809f 100644 --- a/Example/Tests/Doubles/BitmovinPlayerTestDouble.swift +++ b/Example/Tests/Doubles/BitmovinPlayerTestDouble.swift @@ -442,6 +442,15 @@ class BitmovinPlayerStub: NSObject, Player { player.isAirPlayAvailable } + var allowsAirPlay: Bool { + get { + player.allowsAirPlay + } + set { + player.allowsAirPlay = newValue + } + } + var availableVideoQualities: [VideoQuality] { player.availableVideoQualities }