googlevr / gvr-ios-sdk

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

Playing a second video on different controller doesn't work? #173

Closed andrewjedi closed 7 years ago

andrewjedi commented 7 years ago

If I play a GVRVideoView on the first screen, and then stop it. And then I proceed to a new controller to load a new GVRVideoView I just get a green screen...

But if don't play the first video on the first screen, the 2nd controller works fine...

I can't seem to figure out what's going on.

Thanks!

sanjayc77 commented 7 years ago

Is this on the latest version of the SDK (1.10.1)?

andrewjedi commented 7 years ago

Yes @sanjayc77

sanjayc77 commented 7 years ago

Looking into it. Will post when I have an update.

Thanks for reporting.

sanjayc77 commented 7 years ago

This is not happening with the VideoWidgetDemo sample app.

I added a UIBarButtonItem to the navigation bar and an action to VideoPlayerViewController (also add the identifier "videoViewController" to the view controller in storyboard):

- (IBAction)next:(id)sender {
  [_videoView stop];
  VideoPlayerViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"videoViewController"];
  [self.navigationController pushViewController:viewController animated:YES];
}

The video plays fine in either view controller instance.

SeanLintern commented 7 years ago

I did the experiment above, using the demo with the streamed video, on the second VC the cardboard is just black. (I presented, not push just in case that matters.)

andrewjedi commented 7 years ago

Thank you. I think I got it figured out, it was my wrapper I made.