mirza
mirza

Reputation: 77

How to disable/enable fast forward functionality of AVPlayer in Swift

I am Using AVPlayer to play Video files in ios swift. The requirement is, I want to disable fast forward for certain users. is this achievable? Please let me know is any alternative or is there some method to disable it in swift

Upvotes: 2

Views: 2515

Answers (1)

Carlos Chaguendo
Carlos Chaguendo

Reputation: 3085

Use

 self.playerController.setValue(true, forKey: "requiresLinearPlayback")

Doc. https://developer.apple.com/documentation/avkit/avplayerviewcontroller/1627633-requireslinearplayback

Upvotes: 2

Related Questions