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?
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.
Related
I was wondering how to get the current position of an MPMusicPlayer. For example, if the music player is playing a song and it is currently at 0 minutes 23 seconds, how would I get that value as well as set it?
Please use below property to get current position
mpMusicPlayer.currentPlaybackTime
The following links can help you-
How to set music playback slider in music player
Problems with currentPlaybackTime and MPMusicPlayerController and iOS 7.1.
Using MPMusicPlayerController, setting musicPlayer.currentPlaybackTime to seek but takes second to take effect
https://github.com/gangverk/GVMusicPlayerController
I have used AVPlayer to play videos in slow motion. I am using addPeriodicTimeObserverForInterval: message to get time at specific interval, and checking some condition according to current playback time. once condition is fulfilled, I am calculating rate and using setRate: message of AVPlayer. i.e I am setting rate frequently. but once I have done with this, video is not playing smoothly, it's glitchy.
Can anybody please let me know how can I set setRate: frequently.
Thanks
We were having kind of the same issue. We were using setRate:1 (or 1.5/2.0 depending on what the user chose) to play the video instead of calling play. We have changed to call play then setRate: and the video plays smoothly now.
I am using Delphi 5.
I am able to display the .avi or any other video clips using TFilterGraph, but i need to display the progress of video completion, so how could I do that using TFilterGraph.
I need to run next video immediately, so how could I do that as well.
You should request IMediaSeeking interface from the graph object and then call its GetPositions method to learn current position in playback.
Also you can request IMediaEvent interface from the same graph object and then in your main loop get graph events. You'll get EC_COMPLETE event the moment playback ends.
In iOS, I am fully familiar with how to play a local video once a button is pressed. My question: is it possible to have that button play a particular time or minute/second mark in a video?
For example, on Youtube, you can link to a particular part of a video by adding "&t=31m08s" at the end of the URL. Is there any way to do this in iOS?
If you are using MPMoviePlayerController you need to adopt the MPMediaPlayback Protocol which includes the method currentPlaybackTime. From the reference: "Changing the value of this property moves the playhead to the new location."
Here is the Reference for MPMediaPlayback Protocol.
I'm developing a player Application which plays audio for some fixed time. I need to use Gaugefield such that it should fast-forward and rewind the Audio that is currently Playing.
I am able to get the time from the player and displaying on the screen. I need to update the time when the progress of Gaugefield is increased or decreased and at the same time I need to stream the player according to the level of the Gaugefield.
I used the sample code below but it is not working.
Player.stop();
Player.setMediaTime();
Player.start();
I am working on 6.0 OS.
Are you implementing a PlayerListener? If you implement PlayerListener, then you can use the playerUpdate() method to update your GaugeField.