Kumaravel G
Kumaravel G

Reputation: 71

How to hide only Next and Previous button in AVPlayer?

Is there any way to hide only Next and Previous buttons in AVPlayer while playing a video

Upvotes: 2

Views: 3450

Answers (2)

Akash
Akash

Reputation: 491

=> you can get notification when ply or pause and stop when you got notification of play at that time you can hide both next and preivios button

Upvotes: 0

Michael Dautermann
Michael Dautermann

Reputation: 89509

You can only either hide them all or show them all via the AVPlayerViewController showsPlaybackControls property, so what I would recommend doing is using an open source or third party library or framework that controls AVPlayer for you.

Such as what's suggested by this related question, which ultimately points to this GitHub project. You can then remove or hide the controls you don't want to be visible.

Alternatively, you could create your own controls that call into, and control, AVPlayer.

Upvotes: 2

Related Questions