MPMoviePlayerViewController setCurrentPlaybackTime goes to the wrong position

你。 提交于 2019-12-24 08:14:01

问题


I have an application where I play a video in the background, the process is very simple, the same behavior is repeated endlessly. On a user gesture the movie is played for a couple of seconds and paused, The application works perfectly as long as the suer didn't press the home button. when the application comes from the back-ground to the front-ground the video turns all black till the user makes a gesture.

In order to resolve the black screen problem, I shared the player object, then in AppDelegate.m < applicationDidBecomeActive > I prepare the player using the function

[sharedObj.player.moviePlayer prepareToPlay];

then I move its position to where is should be (because the player is returned to the starting point of the video at this time), to do so I call this function

[sharedObj.player.moviePlayer setCurrentPlaybackTime: whereItShouldBe];

And here comes my problem, the video isn't placed where it should be. there is a big difference between the "whereItShouldBe" time and "wherItIsCurrently".

I verified that it's the same object using the object identifier, so did anybody already faced a similar issue ? or has an idea to support me. Thanks in advance.


UPDATE

Closed: closed as not resolved see the comments bellow the question

来源:https://stackoverflow.com/questions/13136420/mpmovieplayerviewcontroller-setcurrentplaybacktime-goes-to-the-wrong-position

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!