So the as per the title how to get video resolution while using SwiftUI and UIKit player view?
You can subscribe to the onVideoPlaybackQualityChanged
listener of the Source
to get the currently displayed video quality, which should include width
and height
, at least if those values are specified in the HLS playlist.
See our documentation for details:
This work only for streams, but what about VOD (when source is mp4 file for example)?
I see. I don’t think this is supported for progressive mp4 files. As mp4 files have a single, fixed quality and resolution, there is typically not much value in the player providing that anyway.
What’s your use case for this?