kaltura / player-sdk-native-ios

Kaltura iOS Player SDK
GNU Affero General Public License v3.0
45 stars 33 forks source link

TPE-23 IOS: App crashes when play video after start casting. #247

Closed Njall2016 closed 8 years ago

Njall2016 commented 8 years ago

Is reproduced with KPlayer SDK v.2.5.0.rc.6 and mwEmbed v.2.48.6. Precondition: there should not be cast sessions running on chromecast. If chromecast is connected please stop casting.

  1. Connect to Chromecast using cast button of Google cast SDK.
  2. Open player and start playing video. Actual result: After a few seconds we observe a crash in file GoogleCastProvider.m line 265. Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull objectForKey:]: unrecognized selector sent to instance 0x1b2a59ef8' To work with Kaltura castProvider we are using the following code: -(void)kPlayer:(KPViewController *)player playerPlaybackStateDidChange:(KPMediaPlaybackState)state { switch (state) { case KPMediaPlaybackStatePlaying: { [self.delegate playerAdapterDidResume]; if (!self.playerVC.castProvider) { self.playerVC.castProvider = self.chromecastListener.castProvider; } break; } ....... } }

We are not calling any method of GoogleCastProvider from any other place inside our code. Should we do something more on our side? We expect that if we start the video after connection with chromecast was established it should automatically start playing on chromecast.