Search code examples
iosvirtual-realitygoogle-vr

How to get current play time of GVRVideoView


I'm using GoogleVR library for iOS to play VR video. I use GVRVideoView. But there is a problem that I don't know how to get current play time. I need to show a Slider on UI, that includes current play time.

https://developers.google.com/vr/ios/get-started

So, how can I get current play back time of GVRVideoView?


Solution

  • GVRVideoView has a delegate method - (void)videoView:(GVRVideoView*)videoView didUpdatePosition:(NSTimeInterval)position;

    You can do with the position, for example, set progress with position/videoView.duration.