How to enable forward/rewind button of AVPlayerViewController.player

Hi,


I'm trying to play a streaming using system-provided playback controls of AVPlayerViewController.

In that case, forward/rewind buttons are disabled.

However, when playing a local movie file, they works!


Is it possible to enable those buttons?

Answered by in 70701022

AVPlayerViewController adapts its capabilities and controls to the asset being played. Not all media resources are capabe of fast forward and rewind, particularly streaming based ones.


To determine if the media asset is capable of fast forward or rewind, inspect the values for canPlayFastForward and canPlayFastReverse properties of the AVPlayerItem.

Accepted Answer

AVPlayerViewController adapts its capabilities and controls to the asset being played. Not all media resources are capabe of fast forward and rewind, particularly streaming based ones.


To determine if the media asset is capable of fast forward or rewind, inspect the values for canPlayFastForward and canPlayFastReverse properties of the AVPlayerItem.

Thank you for your quick responce.

I understand that not all media resources are capable of fast forward and rewind.

I'll check "canPlayFastForward" and "canPlayFastReverse" and then try to make custom controllers.


Your reply really helped me.

Better than making a custom controller, if you find content that returns true for canPlayFastForward and canPlayFastReverse but for which AVPlayerViewController does not display the appropriate controls, please file a bug at bugreporter.apple.com


Glad to be of help!

I'm trying to play a video in detailViewController when clicked on an image from collection view. The video is playing but the play/pause and "Done" button are not working once expanded. Not even the expand/shrink is working after first time expansion.I'm coding in objective C and trying to play a local video file. What should I correct here?

If you can see a button on the screen, but can't tap on it, that's a symptom that your view hierachy is the problem. It generally means that one of the views in the parent view chain has its bounds set too small, so the buttons never get hit tested.


So where is the video (and its buttons) in the view hierachy; and what's above it?


P.S. You posted in a year old thread that had a best answer marked on it; and posted a question that's somewhat unrelated to the original question. You should have created your own thread.

How to enable forward/rewind button of AVPlayerViewController.player
 
 
Q