Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playing video file with 1.5x, 2x speed

I am an iOS developer who should make an app to play video with various speed. I think there is no API to change playback speed on MPMoviePlayerController.

And I couldn't find any solutions.

Can you please tell me how to implement it? or Can you please tell me any Framework/library(SDK) that support above functions for iOS?

like image 332
Wang K Avatar asked Jan 29 '12 03:01

Wang K


1 Answers

There actually is such property.

MPMoviePlayerController adheres to the MPMediaPlayback protocol

See

currentPlaybackRate

The current playback rate for the player. (required)

@property(nonatomic) float currentPlaybackRate

Discussion

This value represents a multiplier for the default playback rate of the current item. A value of 0.0 indicates that playback is stopped while a value of 1.0 indicates that playback is occurring at normal speed. Positive values indicate forward playback while negative values indicate reverse playback.

Setting the value of this property changes the playback rate accordingly.

like image 184
Till Avatar answered Oct 11 '22 17:10

Till