Trait ini digunakan untuk perangkat apa pun yang mendukung download pratinjau klip.
Kolom
Tidak ada kolom yang tersedia untuk sifat ini.
Perintah
Tidak ada perintah yang tersedia untuk karakteristik ini.
Acara
ClipPreview
Klip video tersedia untuk pratinjau.
Pratinjau klip adalah file video 10 frame dalam format mp4. Anda dapat memilih untuk menampilkan file video mp4, atau mentranskodekannya ke format lain (misalnya, GIF animasi) untuk menampilkan urutan 10 frame yang lengkap. Kemampuan klien perangkat harus dipertimbangkan saat memilih metode pratinjau klip.
Objek yang menunjukkan resource yang mungkin memiliki pembaruan serupa dengan peristiwa ini. Resource peristiwa itu sendiri (dari objek resourceUpdate) akan selalu ada dalam objek ini.
object
Lihat Peristiwa untuk mengetahui informasi selengkapnya tentang berbagai jenis peristiwa dan cara kerjanya.
Melihat pratinjau klip
Untuk melihat pratinjau klip, lakukan panggilan GET ke previewUrl menggunakan token akses OAuth di header Otorisasi HTTP:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-06 UTC."],[[["\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"]]