How to use Ybrid features
This audio player SDK supports features to affect the audio content being played to the user. The ybrid interaction protocol is based on a connection between server and client to hold states and to control playback.
Ybrid features are
winding backward and forward in time
winding to a specific time
winding back to live
skipping items backward and forward, for example skipping back to the latest news, to the next music, ...
swapping the item to alternative content within the same timeslot
swapping the service / the channel. Many broadcasters provide more content than the primary radio program does. For example special event channels, party loop channels, different listening perspectives ...
How to use
After integrating the framework into your project, use the following lines of Swift code to access ybrid features:
The signature of AudioPlayer.open
has two callback parameters. The media protocol spoken with the endpoint decides which one is called (asynchronously).
playbackControl
is called for endpoints using Icecast servers or plain HTTP streaming.PlaybackControl
offers the basic set of actions likeplay()
...ybridControl
is called if, behind the scenes, there is a ybrid server detected. Or if you told the endpoint byendpoint.forceProtocol(.ybridV2)
.
YbridControl
extends PlaybackControl
. It allows the following actions on the audio playing:
If you call an action it'll take a short time until you hear the requested change of audio content. audioComplete
hooks on an action are called when the requested changeover is fullfilled. If success == false
the action won't change anything. Use these callbacks to express the change in the user interface.
Implement YbridControlListener and pass it via the listener parameter of AudioPlayer.open
. You will receive the following notifications on startup and when the value changes
Ybrid docs
For a deeper insight into the structure of metadata and the power of Ybrid see Ybrid docs and Ybrid server specs
Last updated