Is it possible to have my own scrubber for MPMoviePlayercontroller

I want to play a video. I use MPMoviePlayer, but I do not want to use the controls provided by MPMoviePlayer. Therefore, I am trying to create my own custom controls. All functions, such as play, pause, full screen, forward, backward. The only problem with the scrubber. I have one UISlider, but I don’t know how to work with it. How to track the current video playback time? How to play the video, where will I slide the thumb of the slider? If anyone knows this, help me with this.

Thanks in advance.

+3
source share
2 answers

. , github. , . , .

+3

-, , iOS 3.2+, iOS 3.1.x.

iOS 3.2+ MPMoviePlayerController MPMediaPlayback, , , .., , , - , . . MPMediaPlayback.

MPMoviePlayerController , :

yourPlayer.controlStyle = MPMovieControlStyleNone;

, , UIClider valueChanged: currentPlaybackTime. 10 :

yourPlayer.currentPlaybackTime = 10;
0

Source: https://habr.com/ru/post/1783381/


All Articles