On iOS and Mac you can access duration of a playable item via avplayerItem.duration which returns duration as CoreMedia.CMTime. I thought it would be quite handy to have a similar duration getter without implementing a polyfill for CMTime.
Please check if the PR fulfills these requirements
[x] Self-review: I am confident this is the simplest and clearest way to achieve the expected behaviour
[ ] There are no dependencies on other PRs or I have linked dependencies through Zenhub
[ ] The commit messages are clean and understandable
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Code runs on all relevant platforms (if major change: screenshots attached)
Type of change: feature
Motivation
On iOS and Mac you can access duration of a playable item via
avplayerItem.duration
which returns duration asCoreMedia.CMTime
. I thought it would be quite handy to have a similar duration getter without implementing a polyfill for CMTime.Please check if the PR fulfills these requirements