I am trying to understand how to work with playback using the mobile SDK.
I am running the example: videoSample.html
It begins with a live stream.
when I click on the canvas, it switches to playback stream, set to 10 minutes before current time. this seems to be a default behavior.
the stream is paused.
clicking the forwards play button has no effect.
clicking the reverse play button functions as expected.
After the stream has played in reverse, clicking forwards button plays the stream until the time of initial load, at which point it is paused.
From this behavior, it would appear that when fetching a playback stream, it is able to play only up until the time set during its initial load.
Is this correct?
Hi. Could you please tell us which exact sample do you use? It could be any of these: videofileviewer.html, videopreview_sample.html, videoreplay_sample.html, videoviewer_sample.html, videoviewer2audio_sample.html, videoviewer2playback_sample.html, videoviewerquality_sample.html, or videowallcontroller_sample.html.
Hi Roy,
You are probably using sample from the MIP SDK Mobile for Web, right ?
When it switches to playback, it doesn’t specify any time and by default MoS goes to the end of DB (end of the record in the RS).
So I could assume that position at which you entered in the playback is the last record. (In your case current time minus 10 minutes)
Described behavior of playing back and forth afterwards seems to prove my theory.
So please check what are your records in the DB trough SC for example.
In addition you could check whether if received frame is in the beginning/end of DB or not. As well as what is the actual state of the playback.
FOr this to happen you could explore the received “frame” object in the "function videoConnectionReceivedFrame(frame) " call back. Look at “hasPlaybackInformation”. The structure is described in the Protocol documentation.
Hi Petar.
Yes, we are using videoSample.html from the MIP SDK Mobile for web.
Thank you for the clarification. I now understand that the default for playback is end of DB.
I have also experimented with setting seekType to time and providing a time, as shown below.
var options = {
signal: XPMobileSDK.interfaces.VideoConnectionSignal.playback,
seekType: 'time',
time: new Date().getTime() - 1000 * 60 * 20
};
In this case, the video appears to be received in a paused state. I assume the default playback-rate is zero.
I then call XPMobileSDK.playbackSpeed and the video starts playing
XPMobileSDK.playbackSpeed(videoController, 1)
Hi Roy,
Yes, by default playback is in stopped state.
You have already find a way to start it 