Why does MPMoviePlayerController setCurrentPlaybackTime goes to the wrong time?

前端 未结 4 1712
借酒劲吻你
借酒劲吻你 2020-12-07 01:00

I am experience some weirdness with MPMoviePlayerController.

I am trying to set the currentPlaybackTime of a video whilst it is playing (file source). Here is an exa

4条回答
  •  既然无缘
    2020-12-07 01:31

    This is a late response, but I found a solution to my issue which was similar. You can modify the playback as follows:

    #define START_TIME 50.0f
    #define END_TIME   START_TIME + 20.0f  //play for 20 seconds
    
    MPMoviePlayerController *player = [self moviePlayerController];
    [player stop];
    [player setInitialPlaybackTime:START_TIME];
    [player setEndPlaybackTime:END_TIME];
    [player play];
    

提交回复
热议问题