Closed AminMahpour closed 4 years ago
I got it working but it might not be the most elegant way to do it:
let pubSubj = thisplayer.rx.itemDuration
pubSubj.subscribe(
{
self.duration = $0.event.element!!
})
check out Rx examples in Demo App, you'll find another way to get it.
otherwise this syntax may be better for you ? (don't forget the onNext parameter)
player.rx.itemDuration.subscribe(onNext: { duration in
// duration is Double? and accessible here
})
also, don't forget to dispose.
Hi Raphrel,
Thanks for developing such an easy to use yet powerful package for Swift.
I am using your package to prototype an ios app using SwiftUI. Everything is working fine except the "duration" of the track. I can't find a way to retrieve this information from the player.
Any help is appreciated. Thanks, Amin