Arc Media Client
This class is used to interface with the Arc server. The API allows for the retrieval of video objects and playlist objects. The client uses the methods in this class to return ArcVideoStream objects. These objects can then be used to play videos using the ArcMediaPlayer.
How does it relate to other important Video SDK classes?
This class does not interact with other classes.
What are the core components that make it up?
var arcMediaClientService: ArcMediaClientService - This is the retrofit interface that defines the server calls.
How is the class used?
Instantiating the media client
class MyFragment : Fragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
ArcMediaClient.instantiate("http://baseurl.com")
}
fun doSomething() {
var mediaClient = ArcMediaClient.getInstance()
mediaClient.findByUuid(.....)
}
}
class MyFragment: Fragment() {
var client1 : ArcMediaClient? = null
var client2: ArcMediaClient? = null
fun connect() {
client1 = ArcMediaClient.createClient("http://client1base")
client2 = ArcMediaClient.createClient("http://client2base")
}
fun useClient1() {
client1.findByUuid(.....)
}
fun useClient2() {
client2.findByUuid(....)
}
}
}
var mediaClient = ArcMediaClient.instantiate("http://baseurl.com")
mediaClient.findByUuid("xxxx-xxx-xxxx-xxxx",
object : ArcVideoStreamCallback {
override fun onVideoStream(videos: List<ArcVideoStream>?) {
//play the video stream
}
}
override fun onError(type: ArcXPSDKErrorType, message: String, value: Any?) {
//process error
}
})
Constructors
Functions
Returns the playlist with the given name containing the first count number of objects. A playlist is a list of ArcVideoStream objects.
Returns the playlist as json with the given name containing the first count number of objects. A playlist is a list of ArcVideoStream objects.
Returns an array containing a single ArcVideoStream object
Returns an json representation of array containing a single ArcVideoStream object
Returns an array containing the ArcVideoStream objects for the given UUIDs
Returns a json representation of an array containing the ArcVideoStream objects for the given UUIDs
Returns list of current live videos
Returns list of current live videos as json String
Returns list of current live videos (suspend)
Returns list of current live videos (suspend) as json String