All Products
Search
Document Center

:Video playback on the cloud

Last Updated:Nov 09, 2023

This topic describes how to play video files that are stored in the IoT Platform console.

Prerequisites

  • An IoT Platform instance of the video type is purchased, and a video device is connected to IoT Platform. For more information, see Device Connection.

  • The video files of an IP camera are stored in the IoT Platform console.

Device-side development

Device-side development is required when your IP camera is directly connected to IoT Platform. For more information, see Developer Guide (Devices).

Cloud-side development

  1. You can call the QueryRecord operation to obtain the details of video files. The details include the following information:

    • The time when a recording started.

    • The time when the recording ended.

    • The name of each video file.

    • The size of each video file.

    • The type of the video recording.

    • The URL of the thumbnail.

    • The type of the data stream.

    • The number of video frames in the video file.

  2. Obtain the URL of a video file.

    Video instances allow you to obtain the URL of a video file based on one of the following parameters:

    • The name of a video file: You can call the QueryRecordUrl operation to obtain the URL of a video file based on the name of the video file that is returned in Step 1.

    • The ID of a video that is generated by using the automatic recording feature: You can call the QueryRecordByRecordId operation to obtain the URL of a video file based on the ID of a video that is generated by using the automatic recording feature.

    • The ID of an event that is generated after the intelligent alerting feature is enabled: You can call the QueryDeviceEventRecord operation to obtain the URL of a video file based on the ID of an event that is generated.

  3. After you obtain the URL of a video file, you can use a player to play the video file.

Application-side development

Before you can play video files, you must configure a player on the application side. The video playback on the cloud feature allows you to play a video only by using HLS. If you want to play a video, develop HLS players based on the type of your application. For more information, see the following topics: