googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
645 stars 191 forks source link

GVRVideoView loadFromURL method sometimes crashes app. #257

Closed heratyian closed 7 years ago

heratyian commented 7 years ago

I am unable to reliably load in new URLs to a GVRVideoView. Sometimes the app locks up and the UI becomes unresponsive. I can still hear audio from the feed. Works maybe 9/10 times. This only happens when calling loadFromUrl multiple times.

[self.videoView loadFromUrl:stream.hls3Endpoint ofType:stream.videoType];

When the app gets locked up, didLoadContent is not called. (void)widgetView:(GVRWidgetView *)widgetView didLoadContent:(id)content

sanjayc77 commented 7 years ago

How are you calling multiple times? Do you reload the app or there is some UI that drives loading the video?

heratyian commented 7 years ago

I get a list of video stream URLs and call loadFromUrl on tap to load in the next video. (void)widgetViewDidTap:(GVRWidgetView *)widgetView

sanjayc77 commented 7 years ago

Just updated to 1.80. This includes GVRKit cocoapod, which is also provided as sample code: See: https://github.com/googlevr/gvr-ios-sdk/blob/master/Samples/GVRKit/GVRVideoRenderer.h and the updated https://github.com/googlevr/gvr-ios-sdk/tree/master/Samples/VideoWidgetDemo sample.

GVRVideoRenderer lets you provide your own AVPlayer, which you can reload as many times as needed.

You should migrate away from GVRVideoView, as that would be deprecated in a future release.