تنتمي هذه السمة إلى أي جهاز يتيح تنزيل معاينة مقطع.
الحقول
لا تتوفّر أي حقول لهذه السمة.
الأوامر
لا تتوفّر أوامر لهذه السمة.
الفعاليات
ClipPreview
يتوفّر مقطع فيديو للمعاينة.
معاينة المقطع هي ملف فيديو يتضمّن 10 لقطات ويكون بتنسيق mp4. يمكنك اختيار عرض ملف الفيديو mp4، أو تحويل ترميزه إلى تنسيق آخر (مثل صورة GIF متحركة) لعرض تسلسل كامل من 10 لقطات. يجب مراعاة إمكانات جهاز العميل عند اختيار طريقة لمعاينة المقاطع.
تاريخ التعديل الأخير: 2025-09-01 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-09-01 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThe \u003ccode\u003eCameraClipPreview\u003c/code\u003e trait enables Nest devices to provide a 10-frame video clip preview in mp4 format triggered by motion, person detection, or doorbell chimes.\u003c/p\u003e\n"],["\u003cp\u003eThis trait utilizes the \u003ccode\u003eClipPreview\u003c/code\u003e event, which includes a \u003ccode\u003epreviewUrl\u003c/code\u003e for accessing the clip and an \u003ccode\u003eeventSessionId\u003c/code\u003e for correlating it with other events.\u003c/p\u003e\n"],["\u003cp\u003eTo view the clip preview, make a GET request to the provided \u003ccode\u003epreviewUrl\u003c/code\u003e with your OAuth access token in the Authorization header.\u003c/p\u003e\n"],["\u003cp\u003eThis trait does not have any associated fields or commands, primarily functioning through events to deliver clip previews.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nCameraClipPreview Schema\n========================\n\n[Nest Doorbell (battery)](/nest/device-access/api/doorbell-battery) [Nest Doorbell (wired)](/nest/device-access/api/doorbell-wired)\n\n`sdm.devices.traits.CameraClipPreview`\n\nThis trait belongs to any device that supports the download of a clip preview.\n\n\u003cbr /\u003e\n\nFields\n------\n\n\nThere are no fields available for this trait.\n\n\u003cbr /\u003e\n\nCommands\n--------\n\nThere are no commands available for this trait.\n\nEvents\n------\n\n\u003cbr /\u003e\n\n### ClipPreview\n\nA video clip is available for preview.\n\nA clip preview is a 10 frame video file in mp4 format. You can choose to show the mp4 video file, or transcode it to another format (for example, an animated gif) in order to show a complete 10 frame sequence. The device client capabilities should be considered when selecting a clip preview method.\n\nThis event is supported for the following events:\n\n| Type | Element | Description |\n|-------|--------------------------------------------------------------------------------------------------|-------------------------------------------|\n| Event | [Motion](/nest/device-access/traits/device/camera-motion#motion) event of the CameraMotion trait | Motion has been detected by the camera. |\n| Event | [Person](/nest/device-access/traits/device/camera-person#person) event of the CameraPerson trait | A person has been detected by the camera. |\n| Event | [Chime](/nest/device-access/traits/device/doorbell-chime#chime) event of the DoorbellChime trait | The doorbell has been pressed. |\n\nUse the `eventSessionId` to associate this event and the related `previewUrl` with one or more supported events.\n\n\u003cbr /\u003e\n\n#### ClipPreview event\n\n### Payload\n\n {\n \"eventId\" : \"7d481e3b-7498-486a-b0b6-fdf4281d5b1f\",\n \"timestamp\" : \"2019-01-01T00:00:01Z\",\n \"resourceUpdate\" : {\n \"name\" : \"enterprises/project-id/devices/device-id\",\n \"events\" : {\n \"sdm.devices.events.CameraClipPreview.ClipPreview\" : {\n \"eventSessionId\" : \"CjY5Y3VKaTZwR3o4Y19YbTVfMF...\",\n \"previewUrl\" : \"https://previewUrl/...\"\n }\n }\n }\n \"userId\" : \"AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi\",\n \"resourceGroup\" : [\n \"enterprises/project-id/devices/device-id\"\n ]\n }\n\n#### ClipPreview event fields\n\n| Field | Description | Data Type |\n|------------------|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| `eventSessionId` | An ID given to events occurring as part of a single session of related events. May be used for consolidating events. | `string` Example: \"CjY5Y3VKaTZwR3o4Y19YbTVfMF...\" |\n| `previewUrl` | The URL at which to preview the video clip. The default video codec is H264. | `string` Example: \"https://\u003cvar translate=\"no\"\u003epreviewUrl\u003c/var\u003e/...\" |\n\n#### Event payload fields\n\n| Field | Description | Data Type |\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n| `eventId` | The unique identifier for the event. | `string` Example: \"7d481e3b-7498-486a-b0b6-fdf4281d5b1f\" |\n| `timestamp` | The time when the event occurred. | `string` Example: \"2019-01-01T00:00:01Z\" |\n| `resourceUpdate` | An object that details information about the resource update. | `object` |\n| `userId` | A unique, obfuscated identifier that represents the user. | `string` Example: \"AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi\" |\n| `resourceGroup` | An object that indicates resources that might have similar updates to this event. The resource of the event itself (from the `resourceUpdate` object) will always be present in this object. | `object` |\n\nSee [Events](/nest/device-access/api/events) for more information on the different\ntypes of events and how they work.\n\n\u003cbr /\u003e\n\n#### Preview the clip\n\n\u003cbr /\u003e\n\nTo preview the clip, make a GET call to the `previewUrl` using the OAuth access token in the HTTP Authorization header: \n\n### Preview\n\n curl -H 'Authorization: Bearer \u003cvar translate=\"no\"\u003eaccess-token\u003c/var\u003e' \\\n https://\u003cvar translate=\"no\"\u003epreviewUrl\u003c/var\u003e/...\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nErrors\n------\n\nSee the [API Error Code Reference](/nest/device-access/reference/errors/api) for\nthe full list of API error codes.\n\n\u003cbr /\u003e"]]