초인종 (배터리)

Nest Doorbell

Google Nest Doorbell (배터리)은 Smart Device Management (SDM) API에서 지원됩니다. 이 기기는 DOORBELL의 기기 유형을 반환합니다.

sdm.devices.types.DOORBELL

Google Nest Doorbell (배터리)에는 카메라가 있으며 카메라는 CAMERA의 기기 유형과 동일하게 작동합니다.

특성

참조

다음 특성, 명령어 또는 이벤트는 이 기기와 관련이 있습니다.

특성설명명령어이벤트
CameraClipPreview이 특성은 클립 미리보기 다운로드를 지원하는 모든 기기에 속합니다.ClipPreview
CameraLiveStream이 특성은 실시간 스트리밍을 지원하는 모든 기기에 속합니다.GenerateWebRtcStream
StopWebRtcStream
CameraMotion이 특성은 움직임 감지 이벤트를 지원하는 모든 기기에 속합니다.움직임
CameraPerson이 특성은 사람 감지 이벤트를 지원하는 모든 기기에 속합니다.사용자
DoorbellChime이 특성은 초인종 차임벨 및 관련 누르기 이벤트를 지원하는 모든 기기에 속합니다.풍경
정보이 특성은 모든 기기에 속하는 기기 관련 정보입니다.

JSON

GET 응답에 trait이 없으면 기기에서 trait 또는 기능을 사용할 수 없음을 나타냅니다. 자세한 내용은 기기 유형을 참고하세요.

{
  "type" : "sdm.devices.types.DOORBELL",
  "traits" : {
    "sdm.devices.traits.CameraClipPreview" : {},
    "sdm.devices.traits.CameraLiveStream" : {
      "maxVideoResolution" : {
        "width" : 640,
        "height" : 480
      },
      "videoCodecs" : ["H264"],
      "audioCodecs" : ["AAC"],
      "supportedProtocols" : ["WEB_RTC"]
    },
    "sdm.devices.traits.CameraMotion" : {},
    "sdm.devices.traits.CameraPerson" : {},
    "sdm.devices.traits.DoorbellChime" : {},
    "sdm.devices.traits.Info" : {
      "customName" : "My device"
    }
  }
}

초인종 및 카메라 이벤트 처리

다음 이벤트는 DOORBELL 기기 유형에서 트리거될 수 있습니다.

유형 요소 설명
이벤트 CameraMotion trait의 모션 이벤트 카메라가 움직임을 감지했습니다.
이벤트 CameraPerson trait의 Person 이벤트 사람이 감지되었습니다.
이벤트 DoorbellChime 특성의 Chime 이벤트 초인종을 눌렀습니다.
예를 들어 여기서는 초인종 버튼을 눌렀습니다.

페이로드

{
  "eventId" : "df41345b-1bf8-41fb-ac34-991282898972",
"timestamp" : "2019-01-01T00:00:01Z",
"resourceUpdate" : { "name" : "enterprises/project-id/devices/device-id", "events" : { "sdm.devices.events.DoorbellChime.Chime" : { "eventSessionId" : "CjY5Y3VKaTZwR3o4Y19YbTVfMF...", "eventId" : "qzamL573ZMC63pqcFOecmnHsn1..." } } } "userId" : "AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi",
"eventThreadId" : "d67cd3f7-86a7-425e-8bb3-462f92ec9f59",
"eventThreadState" : "STARTED",
"resourceGroup" : [ "enterprises/project-id/devices/device-id" ] }

동영상 클립은 미리 볼 수 있으며 previewUrl가 있는 이벤트를 포함합니다. 클립 미리보기가 이벤트와 동시에 게시될 수 있습니다. eventSessionId를 사용하여 이 이벤트와 관련 previewUrl를 하나 이상의 지원되는 이벤트와 연결합니다.

페이로드

{
  "eventId" : "cf92b496-2dce-4588-95f1-f05e0efceca6",
  "timestamp" : "2019-01-01T00:00:45Z",
  "resourceUpdate" : {
    "name" : "enterprises/project-id/devices/device-id",
    "events" : {
      "sdm.devices.events.DoorbellChime.Chime" : {
        "eventSessionId" : "CjY5Y3VKaTZwR3o4Y19YbTVfMF...",
        "eventId" : "qzamL573ZMC63pqcFOecmnHsn1..."
      },
      "sdm.devices.events.CameraClipPreview.ClipPreview" : {
        "eventSessionId" : "CjY5Y3VKaTZwR3o4Y19YbTVfMF...",
        "previewUrl" : "https://previewUrl/..."
      }
    }
  },
  "userId": "AVPHwEuBfnPOnTqzVFT4IONX2Qqhu9EJ4ubO-bNnQ-yi",
  "eventThreadId" : "d67cd3f7-86a7-425e-8bb3-462f92ec9f59",
  "eventThreadState" : "STARTED",
  "resourceGroup" : [
    "enterprises/project-id/devices/device-id"
    ]
  }
}

클립을 미리 보려면 HTTP 승인 헤더에서 OAuth 액세스 토큰을 사용하여 previewUrl에 대한 GET 호출을 수행합니다.

미리보기

curl -H 'Authorization: Bearer access-token' \
  https://previewUrl/...

클립 미리보기는 mp4 형식의 10프레임 동영상 파일입니다. 전체 10프레임 시퀀스를 표시하기 위해 mp4 동영상 파일을 표시하거나 다른 형식 (예: 애니메이션 GIF)으로 트랜스코딩할 수 있습니다. 클립 미리보기 방식을 선택할 때는 기기 클라이언트 기능을 고려해야 합니다.

실시간 스트림 액세스

카메라에서 실시간 스트림에 액세스할 수 있습니다. 이 기기에서는 다음 스트림 형식이 지원됩니다.

  • WebRTC

카메라와 지원되는 스트림 형식의 전체 목록은 지원되는 기기를 참고하세요.

실시간 스트림에 액세스하려면CameraLiveStream특성의 적절한 스트림 생성Format명령어를 사용합니다.

WebRTC


WebRTC 스트림의 경우 CameraLiveStream 트레잇에 있는 GenerateWebRtcStream 명령어에 offerSdp를 전송하여 answerSdp를 가져옵니다.

요청

POST /enterprises/project-id/devices/device-id:executeCommand
{
  "command" : "sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream",
  "params" : {
    "offerSdp" : "offerSdp"
  }
}

응답

{
  "results" : {
    "answerSdp" : "answerSdp",
    "expiresAt" : "2020-01-04T18:30:00.000Z",
    "mediaSessionId" : "XmJl59jFaDAJm9tWadEYtM8yDD..."
  }
}

웹 애플리케이션 샘플을 사용하여 성공적인 실시간 스트림을 생성하는 방법을 알아보세요. 이 샘플은 Nest 카메라의 모든 SDP 제품 제한사항을 충족하는 유효한 offerSdp를 생성합니다.

Nest 카메라용 SDP 제품은 다음 제한사항을 충족해야 합니다.

  • 통합 형식만 지원됩니다. Plan B는 지원되지 않습니다.
  • 모든 미디어 회선 (m=)이 혜택에 있어야 하며 다음 순서를 따라야 합니다.
    1. 오디오 기능
    2. 동영상
    3. 방법
  • Trickle ICE는 지원되지만 필수는 아닙니다.
  • Opus 코덱만 오디오로 지원됩니다.
  • 오디오 설정을 a=recvonly (수신 전용)으로 설정해야 합니다.
  • 혜택은 \r\n 또는 \n의 줄바꿈 문자로 끝나야 합니다.

answerSdp는 응답을 받은 후 30초 이내에 실시간 스트림을 생성하는 데 사용해야 하며, 그러지 않으면 만료됩니다. 만료되면 GenerateWebRtcStream 명령어를 다시 실행하여 새 answerSdp를 받습니다.

실시간 스트림을 위한 WebRTC 채널을 열 때 데이터 채널과 동영상 채널을 만들어야 합니다.

유효한 혜택의 예 보기

형식 지정되지 않음:

v=0\r\no=- 2214114893783582286 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1 2\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:6ReD\r\na=ice-pwd:QBmcZYd/t+InpMVkxQEEXnE4\r\na=ice-options:trickle\r\na=fingerprint:sha-256 DD:7E:6F:CD:B8:13:4E:37:D2:92:6D:8E:30:FB:FE:13:29:C9:F8:FD:78:0B:C4:59:42:61:BC:CF:02:91:6B:3C\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=recvonly\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:63 red/48000/2\r\na=fmtp:63 111/111\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 122 102 121 127 120 125 107 108 109 35 36 124 119 123 118 114 115 116 37\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:6ReD\r\na=ice-pwd:QBmcZYd/t+InpMVkxQEEXnE4\r\na=ice-options:trickle\r\na=fingerprint:sha-256 DD:7E:6F:CD:B8:13:4E:37:D2:92:6D:8E:30:FB:FE:13:29:C9:F8:FD:78:0B:C4:59:42:61:BC:CF:02:91:6B:3C\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=recvonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 VP9/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 profile-id=2\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:122 VP9/90000\r\na=rtcp-fb:122 goog-remb\r\na=rtcp-fb:122 transport-cc\r\na=rtcp-fb:122 ccm fir\r\na=rtcp-fb:122 nack\r\na=rtcp-fb:122 nack pli\r\na=fmtp:122 profile-id=1\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:120 rtx/90000\r\na=fmtp:120 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 H264/90000\r\na=rtcp-fb:108 goog-remb\r\na=rtcp-fb:108 transport-cc\r\na=rtcp-fb:108 ccm fir\r\na=rtcp-fb:108 nack\r\na=rtcp-fb:108 nack pli\r\na=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:35 AV1/90000\r\na=rtcp-fb:35 goog-remb\r\na=rtcp-fb:35 transport-cc\r\na=rtcp-fb:35 ccm fir\r\na=rtcp-fb:35 nack\r\na=rtcp-fb:35 nack pli\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:124 H264/90000\r\na=rtcp-fb:124 goog-remb\r\na=rtcp-fb:124 transport-cc\r\na=rtcp-fb:124 ccm fir\r\na=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\na=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=124\r\na=rtpmap:123 H264/90000\r\na=rtcp-fb:123 goog-remb\r\na=rtcp-fb:123 transport-cc\r\na=rtcp-fb:123 ccm fir\r\na=rtcp-fb:123 nack\r\na=rtcp-fb:123 nack pli\r\na=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032\r\na=rtpmap:118 rtx/90000\r\na=fmtp:118 apt=123\r\na=rtpmap:114 red/90000\r\na=rtpmap:115 rtx/90000\r\na=fmtp:115 apt=114\r\na=rtpmap:116 ulpfec/90000\r\na=rtpmap:37 flexfec-03/90000\r\na=rtcp-fb:37 goog-remb\r\na=rtcp-fb:37 transport-cc\r\na=fmtp:37 repair-window=10000000\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:6ReD\r\na=ice-pwd:QBmcZYd/t+InpMVkxQEEXnE4\r\na=ice-options:trickle\r\na=fingerprint:sha-256 DD:7E:6F:CD:B8:13:4E:37:D2:92:6D:8E:30:FB:FE:13:29:C9:F8:FD:78:0B:C4:59:42:61:BC:CF:02:91:6B:3C\r\na=setup:actpass\r\na=mid:2\r\na=sctp-port:5000\r\na=max-message-size:262144\r\n

형식 지정됨:

v=0
o=- 2214114893783582286 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=extmap-allow-mixed
a=msid-semantic: WMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:6ReD
a=ice-pwd:QBmcZYd/t+InpMVkxQEEXnE4
a=ice-options:trickle
a=fingerprint:sha-256 DD:7E:6F:CD:B8:13:4E:37:D2:92:6D:8E:30:FB:FE:13:29:C9:F8:FD:78:0B:C4:59:42:61:BC:CF:02:91:6B:3C
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=recvonly
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 122 102 121 127 120 125 107 108 109 35 36 124 119 123 118 114 115 116 37
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:6ReD
a=ice-pwd:QBmcZYd/t+InpMVkxQEEXnE4
a=ice-options:trickle
a=fingerprint:sha-256 DD:7E:6F:CD:B8:13:4E:37:D2:92:6D:8E:30:FB:FE:13:29:C9:F8:FD:78:0B:C4:59:42:61:BC:CF:02:91:6B:3C
a=setup:actpass
a=mid:1
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:122 VP9/90000
a=rtcp-fb:122 goog-remb
a=rtcp-fb:122 transport-cc
a=rtcp-fb:122 ccm fir
a=rtcp-fb:122 nack
a=rtcp-fb:122 nack pli
a=fmtp:122 profile-id=1
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=102
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:120 rtx/90000
a=fmtp:120 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:35 AV1/90000
a=rtcp-fb:35 goog-remb
a=rtcp-fb:35 transport-cc
a=rtcp-fb:35 ccm fir
a=rtcp-fb:35 nack
a=rtcp-fb:35 nack pli
a=rtpmap:36 rtx/90000
a=fmtp:36 apt=35
a=rtpmap:124 H264/90000
a=rtcp-fb:124 goog-remb
a=rtcp-fb:124 transport-cc
a=rtcp-fb:124 ccm fir
a=rtcp-fb:124 nack
a=rtcp-fb:124 nack pli
a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=124
a=rtpmap:123 H264/90000
a=rtcp-fb:123 goog-remb
a=rtcp-fb:123 transport-cc
a=rtcp-fb:123 ccm fir
a=rtcp-fb:123 nack
a=rtcp-fb:123 nack pli
a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
a=rtpmap:118 rtx/90000
a=fmtp:118 apt=123
a=rtpmap:114 red/90000
a=rtpmap:115 rtx/90000
a=fmtp:115 apt=114
a=rtpmap:116 ulpfec/90000
a=rtpmap:37 flexfec-03/90000
a=rtcp-fb:37 goog-remb
a=rtcp-fb:37 transport-cc
a=fmtp:37 repair-window=10000000
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:6ReD
a=ice-pwd:QBmcZYd/t+InpMVkxQEEXnE4
a=ice-options:trickle
a=fingerprint:sha-256 DD:7E:6F:CD:B8:13:4E:37:D2:92:6D:8E:30:FB:FE:13:29:C9:F8:FD:78:0B:C4:59:42:61:BC:CF:02:91:6B:3C
a=setup:actpass
a=mid:2
a=sctp-port:5000
a=max-message-size:262144

실시간 스트림 확장하기

카메라 실시간 스트림 세션은 5분 동안만 유효합니다. 실시간 스트림의 전체 기간을 연장해야 한다면 생성한 스트림 형식에 맞는 CameraLiveStream 특성의 스트림 연장 명령어를Format사용하세요.

WebRTC


실시간 스트림 중지

카메라 실시간 스트림을 더 이상 사용하지 않을 때는 실시간 스트림을 중지하고 무효화해야 합니다. 이렇게 하려면 생성한 스트림 형식에 맞는CameraLiveStream특성의 적절한 StopFormatStream 명령어를 사용하세요.

WebRTC


WebRTC 스트림을 중지하려면 CameraLiveStream 트레잇의 StopWebRtcStream 명령어를 사용하여 미디어 세션 ID를 지정합니다.

요청

POST /enterprises/project-id/devices/device-id:executeCommand
{
  "command" : "sdm.devices.commands.CameraLiveStream.StopWebRtcStream",
  "params" : {
    "mediaSessionId" : "XmJl59jFaDAJm9tWadEYtM8yDD..."
  }
}

응답

{}

오류

이 기기와 관련하여 다음과 같은 오류 코드가 반환될 수 있습니다.

오류 메시지 RPC 문제 해결
초인종에는 명령어가 지원되지 않습니다. FAILED_PRECONDITION 배터리 전원을 사용하는 초인종에서는 WebRTC 스트림을 확장할 수 없습니다. 초인종의 스트림을 초기 세션 길이 이상으로 시청해야 하는 경우 기존 스트림을 중지하고 새 스트림을 생성합니다.
쿠폰 SDP가 잘못되었습니다. INVALID_ARGUMENT 쿠폰 SDP 오디오는 a=recvonly (수신 전용)으로 설정해야 합니다.
잘못된 쿠폰 SDP에 CRLF가 누락되었습니다. INVALID_ARGUMENT WebRTC 스트림을 생성하려고 할 때 offerSdp 문자열 끝에 줄바꿈 문자가 누락되었습니다. offerSdp 문자열이 \r\n 또는 \n로 끝나는지 확인하고 스트림 생성을 다시 시도합니다.
쿠폰 SDP m-lines가 잘못되었습니다. INVALID_ARGUMENT 제품 SDP에는 오디오, 동영상, 애플리케이션 m라인이 순서대로 모두 포함되어야 합니다.
시간 초과로 응답 SDP를 가져올 수 없습니다. DEADLINE_EXCEEDED WebRTC 실시간 스트림을 다시 생성해 봅니다.

API 오류 코드의 전체 목록은 API 오류 코드 참조를 확인하세요.