yospaceCDS supports an API to provide control over content delivered via streaming over RTSP/RTP. This API is useful if you want to:
If you are using yospaceCDS to delivery long-form content to mobile, then you should consider using this API to allow users to come back to a video they have been watching where they left off. This is especially important in mobile as users usually watch smaller segments of content than on-line for a variety of reasons. The API can be used to implement a converged video offering where users can seamlessly watch content on their mobile and on-line, each time continuing from where they left off regardless of how they are accessing the content.
The API lets you specify the time code when you want the video to start from, and will tell your application when the stream has stopped, regardless of whether the user pressed stop, pressed the red key, lost coverage, their battery ran out, etc., etc. In order to make full use of the API it will be necessary for you to be able to track your users and store the information of when they stopped playing in your application against the specific user. The API does not mandate how you do this, and it is up to you to choose the method that suits your application.
Before reading about the Streaming Start / Stop API, we recommend that you first read about the Access URL Syntax.
Here is an example URL to some content streamed over RTSP/RTP:
Note that this URL contains the optional feed ID (f=75752683687). The use of the feed ID parameter is not significant for Start / Resume, but we recommend that you make use of it so that video accesses are reported correctly against the different feeds that you have set up in your yospaceCDS account.
start parameter you can choose the number of seconds where the video will start playing:
This example will start the video 30 seconds in, however the user is free to use video transport controls on their handset to seek anywhere in the video, regardless of the initial start point.
As soon as yospaceCDS has stopped streaming video content to the handset, the Streaming Start / Stop API can be used to send information to a Progress Logger within your application. You must register your progress logger URL with Yospace (by emailing firstname.lastname@example.org). In fact, you can register multiple loggers, for example, each environment having its own logger, e.g. development, staging, production.
Please register the following Progress Loggers:
Your Yospace Account
You will then receive a Progress Logger reference for each of the loggers that you register. You will need to change the Access URL to contain your Progress Logger reference.
mylogger is the logger ID that you were given by Yospace support.
You will also need to specify a user reference that will be passed to your Progress Logger so that it can identify which user account to associate the stop position, this is
achieved with the
ref parameter. Hence, the final URL will look something like this (in this example, the feed ID parameter has been ommitted for the purposes of clarity):
yospaceCDS will append:
refcontaining the original
refyou passed in,
finishwhich determines the approximate point at which the user stopped playing, and
lengthwhich is the total length of the video.
All timings given are in whole seconds.
Given the example above, assuming that
mylogger is registered against
when the user stops playing the video, the following URL will be fetched by yospaceCDS:
This means that the user stopped playing at approximately 120 seconds into the 360 second video.
Due to handset buffering, which can vary between device and device, yospaceCDS cannot determine exactly when the video stopped playing on the handset. On average the actual value given to you may be up to 10 seconds earlier than when the video was actually stopped.