How to use Ybrid features
Ybrid features are
How to use
import YbridPlayerSDK
let swr3Endpoint = MediaEndpoint(mediaUri: "http://swr-swr3.cast.ybrid.io/swr/swr3/ybrid").forceProtocol(.ybridV2)
try AudioPlayer.open(for: swr3Endpoint, listener: nil, playbackControl: nil) {
(ybridControl) in /// called asychronously
ybridControl.play()
sleep(2)
ybridControl.skipBackward(ItemType.NEWS)
sleep(10) /// listen to the news
ybridControl.stop()
/// ...
ybridControl.close()
}
sleep(12) /// of course the program must not end hereYbrid docs
Last updated