SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
158 stars 33 forks source link

Custom menu button support? #107

Closed defagos closed 1 year ago

defagos commented 2 years ago

iOS 13 introduced menus, which are used in iOS 15 to choose tracks:

https://user-images.githubusercontent.com/170201/133418101-6a0718ad-4471-4d55-a1a0-a973049c6881.MP4

While our subtitle and audio track selection has a nicer UX (explanations of behaviors, most notably for automatic selection, translated labels), using menus could provide a nice way to group some settings, or to provide a way to add custom player actions.

A rough idea:

defagos commented 2 years ago

iOS 16 even introduces an API which makes it possible to keep the menu open after selection. Could be useful for subtitle and audio track selection.

defagos commented 1 year ago

SRG Media Player player successor found in our new Pillarbox library makes it easy to provide a custom appearance for settings like audio tracks, subtitles or playback speeds.

Such customization is not limited to menus, you can also introduce a slider to pick the playback speed, for example. SwiftUI is the recommended approach and an API is also available to customize the behavior of menus when a selection is made ( .menuActionDismissBehavior(_:).

We won't therefore implement this feature in SRG Media Player. Closed.