Hi Revan,
Could you provide us a little bit more detail, please ?
Sample code for example.
The best will be if you have and communication trace.
Thanks in advance !
Hi Revan,
Could you provide us a little bit more detail, please ?
Sample code for example.
The best will be if you have and communication trace.
Thanks in advance !
HashMap<String, String> videoProps = new HashMap<>();
// Use a default width & height
videoProps.put(CommunicationCommand.PARAM_WIDTH, “640”);
videoProps.put(CommunicationCommand.PARAM_HEIGHT, “480”);
videoProps.put(CommunicationCommand.PARAM_USER_DOWNSAMPLING, “No”);
videoProps.put(CommunicationCommand.PARAM_RESIZE_AVAILABLE, “Yes”);
videoProps.put(CommunicationCommand.PARAM_INVESTIGATION_ID, “bcc7571a-0119-4aea-b536-a5598733e971”);
videoProps.put(CommunicationCommand.PARAM_ITEM_ID, cameraId);
videoProps.put(CommunicationCommand.PARAM_CAN_EXPORT_AVI, “Yes”);
videoProps.put(CommunicationCommand.PARAM_CAN_EXPORT_JPEG, “Yes”);
HashMap<String, Object> allProperties = new HashMap<>();
allProperties.put(LiveVideo.CAMERA_ID_PROPERTY, camera.getId() );
allProperties.put(LiveVideo.VIDEO_PROPERTIES, videoProps );
playbackVideo = xpMobileSDK.requestPlaybackVideo(VideoReceiver.this,allProperties);
playbackVideo.setIsPull(true);
ErrorState rslt = playbackVideo.requestVideo();
Hi @Revan Akepati
Please follow the Milestone’s playback sample for Android and just change the parameters that you pass to the server with:
//Setting up video settings
val videoProps = HashMap<String, String>()
videoProps.put(CommunicationCommand.PARAM_WIDTH, videoView?.width.toString())
videoProps.put(CommunicationCommand.PARAM_HEIGHT, videoView?.height.toString())
videoProps.put(CommunicationCommand.PARAM_USER_DOWNSAMPLING, “No”)
videoProps.put(CommunicationCommand.PARAM_RESIZE_AVAILABLE, “Yes”)
videoProps.put(CommunicationCommand.PARAM_INVESTIGATION_ID, “812f01e3-1e3e-4626-bd69-bb42054f28ea”)
videoProps.put(CommunicationCommand.PARAM_FORCE_PLAYBACK_FROM_EXPORT, “Yes”)
videoProps.put(CommunicationCommand.PARAM_SEEK_TYPE, “TimeOrAfter”)
videoProps.put(CommunicationCommand.PARAM_TIME, “1538987908919”) // For this example the PARAM_TIME is equal as the StartTime parameter, which is received from the GetInvestigations command.
//Setting up video channel properties
val allProperties = HashMap<String, Any>()
allProperties.put(PlaybackVideo
.CAMERA_ID_PROPERTY, “0a71f753-2ba0-4724-a9bb-4a7e5d99f889”)
allProperties.put(PlaybackVideo
.VIDEO_PROPERTIES, videoProps)
allProperties.put(PlaybackVideo
.FPS_PROPERTY, “8”)
Thread(Runnable {
//Instancing playback object
playbackVideo = applicationObject?.xpMobileSDK?.requestPlaybackVideo(this,allProperties)
}).start()
So after the playbackVideo object is successfully created, you should use it for managing the direction of playing as written in the example.
For more information about the request/response parameters, please read the official Mobile Server Protocol Documentation.
If you have some issues or questions, do not hesitate to ask.
Regards, Dilyan.