THEOplayer/react-native-connectors

Unable to build iOS/tvOS

Opened this issue · 7 comments

I just updated react-native-theoplayer@7.0.0 and @theoplayer/react-native-analytics-youbora@1.2.0 and when running iOS, I am getting the following error:

Screenshot 2024-04-12 at 11 33 13

/ios/Pods/YouboraTHEOPlayerAdapter/YouboraTHEOPlayerAdapter tvOS/YBTHEOPlayerAdapter.swift:351:20 Value of type 'THEOplayer' has no member 'requestVideoWidth'

Is it maybe a side effect of updating react-native-theoplayer to its latest version? 🤔

same here using react-native-theoplayer@7.0.0 and @theoplayer/react-native-analytics-youbora@1.2.0

  206 |     override public func getPlayhead() -> NSNumber? {
  207 |         if let player = player as? THEOplayer {
> 208 |             player.requestCurrentTime(completionHandler: {(currentTime,error) in
      |                    ^ value of type 'THEOplayer' has no member 'requestCurrentTime'
  209 |                 self.lastReportedPlayhead = currentTime!
  210 |             })
  211 |         }
  349 |             }
  350 |
> 351 |             player.requestVideoWidth { (width, error) in
      |                    ^ value of type 'THEOplayer' has no member 'requestVideoWidth'
  352 |                 if let width = width {
  353 |                     self.lastReportedWidth = width
  354 |                 }
  
  355 |             }
  356 |
> 357 |             player.requestVideoHeight { (height, error) in
      |                    ^ value of type 'THEOplayer' has no member 'requestVideoHeight'
  358 |                 if let height = height {
  359 |                     self.lastReportedHeight = height
  360 |                 }

Any news on this? it has been several weeks now and this issue still persist

@michelecocuccio you'll have to upgrade your react-native-theoplayer package to at least v7.2.0. It looks like we didn't restrict the version needed by the latest changes in the youbora connector.

On the native iOS SDK some async API's have been deprecated, replacing them with a sync version. It looks like this connector is not updated accordingly.
Instead of

  351 |             player.requestVideoWidth { (width, error) in
  352 |                 if let width = width {
  353 |                     self.lastReportedWidth = width
  354 |                 }
  355 |             }

We should now use

352 |                 if let width = player.videoWidth  {
353 |                     self.lastReportedWidth = width
354 |                 }
355 |             

You can already patch your local version if you like.
We'll prepare an update of the connector.

What version of the YouboraTHEOPlayerAdapter pod is installed? I checked and the latest version does use the correct API.
I'm running react-native-theoplayer 7.3.0 and a pod install of the youbora connector installs the following pods:
Installing YouboraLib (6.7.11)
Installing YouboraTHEOPlayerAdapter (6.7.1)
Installing react-native-theoplayer-youbora (1.2.0)

Which has the following implementation on getRendition()
Screenshot 2024-06-06 at 14 47 14

We indeed do not set a minimum version on the Adapter pod in our connector's podspec.

s.dependency "YouboraTHEOPlayerAdapter"

I think a pod update should do the trick.