kingslay / KSPlayer

A video player for iOS、macOS、tvOS、visionOS , based on AVPlayer and FFmpeg, support the horizontal, vertical screen. support adjust volume, brightness and seek by slide, support subtitles.
GNU General Public License v3.0
886 stars 184 forks source link

Updating KSNowPlayableMetadata #670

Closed Alanko5 closed 7 months ago

Alanko5 commented 7 months ago

KSNowPlayableMetadata have private initialisers and properties.

I need update artwork or initialise with image url.

but you are initialise only with name: nowPlayingInfo = KSNowPlayableMetadata(title: name)

I have no way to set other values.

kingslay commented 7 months ago

nowPlayingInfo这个变量是可以改的。你可以在KSPlayerResource init方法之后。重新为nowPlayingInfo 赋值。

Alanko5 commented 7 months ago
Snímka obrazovky 2023-11-27 o 13 07 02 Snímka obrazovky 2023-11-27 o 13 10 07
trial commented 7 months ago

Does anyone experience an issue that MPNowPlayingInfoCenter only works for once? My player view is on the top and my channel table view is on the bottom, every time I press the table cell, I update the nowPlayingInfo. But it only works for the first time I press the cell. When I press the cell the second time, MPNowPlayingInfoCenter disappears.