CameraLiveStream स्कीमा

Nest Cam (पुराना मॉडल) Nest Cam (आउटडोर या इंडोर, बैटरी वाला) Nest Cam with floodlight Nest Cam (इंडोर, तार वाला) Nest Hub Max Nest Doorbell (पुराना मॉडल) Nest Doorbell (बैटरी वाला) Nest Doorbell (तार वाला) 

sdm.devices.traits.CameraLiveStream

यह ट्रेट, लाइव स्ट्रीमिंग की सुविधा वाले हर डिवाइस में होती है.

फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
maxVideoResolution लाइव स्ट्रीम किए जा रहे वीडियो का ज़्यादा से ज़्यादा रिज़ॉल्यूशन. VideoResolution
videoCodecs लाइव स्ट्रीम के लिए इस्तेमाल किए जा सकने वाले वीडियो कोडेक. array(string)
Value: ["H264"]
audioCodecs लाइव स्ट्रीम के लिए इस्तेमाल किए जा सकने वाले ऑडियो कोडेक. array(string)
Value: ["AAC"]
supportedProtocols डिवाइस पर इस्तेमाल किए जा सकने वाले स्ट्रीमिंग प्रोटोकॉल. इस फ़ील्ड की वैल्यू से पता चलता है कि डिवाइस के लिए कौनसे निर्देश इस्तेमाल किए जा सकते हैं. उदाहरण के लिए, अगर इस फ़ील्ड में WEB_RTC शामिल है, तो सिर्फ़ WEB_RTC के निर्देश इस्तेमाल किए जा सकते हैं. array(string)
Value: ["RTSP", "WEB_RTC"]

VideoResolution (maxVideoResolution)

फ़ील्ड ब्यौरा डेटा टाइप
width इमेज का ज़्यादा से ज़्यादा रिज़ॉल्यूशन विड्थ. इसका इस्तेमाल, डाउनलोड यूआरएल में क्वेरी पैरामीटर के तौर पर भी किया जा सकता है. int32
Example: 640
height इमेज का ज़्यादा से ज़्यादा रिज़ॉल्यूशन हाइट. इसका इस्तेमाल, डाउनलोड यूआरएल में क्वेरी पैरामीटर के तौर पर भी किया जा सकता है. int32
Example: 480

GET अनुरोध और जवाब का उदाहरण

अनुरोध

GET /enterprises/project-id/devices/device-id

जवाब

{
  "name" : "enterprises/project-id/devices/device-id",
  "traits" : {
    "sdm.devices.traits.CameraLiveStream" : {
      "maxVideoResolution" : {
        "width" : 640,
        "height" : 480
      },
      "videoCodecs" : ["H264"],
      "audioCodecs" : ["AAC"],
      "supportedProtocols" : ["WEB_RTC"]
    }
  }
}

निर्देश

GenerateRtspStream

Nest Cam (पुराना मॉडल) Nest Hub Max Nest Doorbell (पुराना मॉडल) 

RTSP लाइव स्ट्रीम के यूआरएल को ऐक्सेस करने के लिए, टोकन का अनुरोध करें.

RTSP लाइव स्ट्रीम के यूआरएल को क्लाइंट के बीच शेयर नहीं किया जा सकता. एक समय में, किसी स्ट्रीम के यूआरएल का इस्तेमाल सिर्फ़ एक क्लाइंट कर सकता है. अगर एक से ज़्यादा क्लाइंट, एक ही कैमरे से एक ही समय पर स्ट्रीम करना चाहते हैं, तो हर क्लाइंट के लिए RTSP के निर्देश भेजने होंगे. साथ ही, हर क्लाइंट को अपनी स्ट्रीम के यूआरएल का इस्तेमाल करना होगा.

GenerateRtspStream का अनुरोध और जवाब

अनुरोध

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

जवाब

{
  "results" : {
    "streamUrls" : {
      "rtspUrl" : "rtsps://someurl.com/CjY5Y3VKaTZwR3o4Y19YbTVfMF...?auth=g.0.streamingToken"
    },
    "streamExtensionToken" : "CjY5Y3VKaTZwR3o4Y19YbTVfMF...",
    "streamToken" : "g.0.streamingToken",
    "expiresAt" : "2018-01-04T18:30:00.000Z"
  }
}

GenerateRtspStream के जवाब के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
streamUrls RTSP लाइव स्ट्रीम के यूआरएल का मैप. object
streamExtensionToken RTSP लाइव स्ट्रीम के लिए, streamToken की समयसीमा बढ़ाने के लिए इस्तेमाल किया जाने वाला टोकन. string
Example: "CjY5Y3VKaTZwR3o4Y19YbTVfMF..."
streamToken RTSP लाइव स्ट्रीम को ऐक्सेस करने के लिए इस्तेमाल किया जाने वाला टोकन. string
Example: "g.0.streamingToken"
expiresAt वह समय जब आरएफ़सी 3339 फ़ॉर्मैट में, streamExtensionToken और streamToken दोनों की समयसीमा खत्म हो जाती है. string
Example: "2018-01-04T18:30:00.000Z"

ExtendRtspStream

Nest Cam (पुराना मॉडल) Nest Hub Max Nest Doorbell (पुराना मॉडल) 

किसी मान्य RTSP ऐक्सेस टोकन की समयसीमा खत्म होने से पहले, उसे बदलने के लिए, RTSP लाइव स्ट्रीम के यूआरएल के नए ऐक्सेस टोकन का अनुरोध करें. इसका इस्तेमाल, ExtendRtspStream के पिछले निर्देश के अनुरोध से मिले किसी मान्य RTSP टोकन को बदलने के लिए भी किया जाता है.

कैमरे की लाइव स्ट्रीम के सेशन सिर्फ़ पांच मिनट के लिए मान्य होते हैं. अगर आपको लाइव स्ट्रीम की समयसीमा बढ़ानी है, तो जनरेट किए गए स्ट्रीम फ़ॉर्मैट के लिए, CameraLiveStreamtrait के ExtendFormatStream निर्देश का इस्तेमाल करें.

ExtendRtspStream का अनुरोध और जवाब

अनुरोध

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

जवाब

{
  "results" : {
    "streamExtensionToken" : "dGNUlTU2CjY5Y3VKaTZwR3o4Y1...",
    "streamToken" : "g.0.newStreamingToken",
    "expiresAt" : "2018-01-04T18:30:00.000Z"
  }
}

ExtendRtspStream के अनुरोध के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
streamExtensionToken RTSP स्ट्रीमिंग टोकन की समयसीमा बढ़ाने का अनुरोध करने के लिए इस्तेमाल किया जाने वाला टोकन. string
Example: "CjY5Y3VKaTZwR3o4Y19YbTVfMF..."

ExtendRtspStream के जवाब के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
streamExtensionToken मौजूदा RTSP लाइव स्ट्रीम को देखने और स्ट्रीमिंग टोकन की समयसीमा बढ़ाने का अनुरोध करने के लिए इस्तेमाल किया जाने वाला टोकन. string
Example: "dGNUlTU2CjY5Y3VKaTZwR3o4Y1..."
streamToken मौजूदा RTSP लाइव स्ट्रीम को ऐक्सेस करने के लिए इस्तेमाल किया जाने वाला नया टोकन. string
Example: "g.0.newStreamingToken"
expiresAt वह समय जब आरएफ़सी 3339 फ़ॉर्मैट में, streamExtensionToken और streamToken दोनों की समयसीमा खत्म हो जाती है. string
Example: "2018-01-04T18:30:00.000Z"

StopRtspStream

Nest Cam (पुराना मॉडल) Nest Hub Max Nest Doorbell (पुराना मॉडल) 

इससे, मान्य RTSP ऐक्सेस टोकन अमान्य हो जाता है. साथ ही, उस ऐक्सेस टोकन से जुड़ी RTSP लाइव स्ट्रीम बंद हो जाती है.

StopRtspStream का अनुरोध और जवाब

अनुरोध

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

जवाब

{}

StopRtspStream के अनुरोध के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
streamExtensionToken मौजूदा RTSP लाइव स्ट्रीम को अमान्य करने के लिए इस्तेमाल किया जाने वाला टोकन. string
Example: "CjY5Y3VKaTZwR3o4Y19YbTVfMF..."

GenerateWebRtcStream

Nest Cam (पुराना मॉडल) Nest Cam (आउटडोर या इंडोर, बैटरी वाला) Nest Cam with floodlight Nest Cam (इंडोर, तार वाला) Nest Doorbell (बैटरी वाला) Nest Doorbell (तार वाला) 

किसी डिवाइस के लिए, WebRTC लाइव स्ट्रीम जनरेट करें.

GenerateWebRtcStream का अनुरोध और जवाब

अनुरोध

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" : "Tp-TEPvJ8Qseo3FShZCAFjXopl..."
  }
}

GenerateWebRtcStream के अनुरोध के फ़ील्ड

हमारा सुझाव है कि लाइव स्ट्रीम जनरेट करने का तरीका जानने के लिए, वेब ऐप्लिकेशन के सैंपल का इस्तेमाल करें. इस सैंपल से, एक मान्य offerSdp जनरेट होता है. यह Nest कैमरों के लिए, SDP ऑफ़र की सभी पाबंदियों को पूरा करता है.

Nest कैमरों के लिए, SDP ऑफ़र को इन पाबंदियों के मुताबिक होना चाहिए:

  • सिर्फ़ यूनिफ़ाइड फ़ॉर्मैट इस्तेमाल किया जा सकता है. प्लान बी इस्तेमाल नहीं किया जा सकता.
  • ऑफ़र में सभी मीडिया लाइनें (m=) मौजूद होनी चाहिए. साथ ही, वे इस क्रम में होनी चाहिए:
    1. ऑडियो
    2. वीडियो
    3. ऐप्लिकेशन
  • ट्रिकल ICE इस्तेमाल किया जा सकता है. हालांकि, यह ज़रूरी नहीं है.
  • ऑडियो के लिए, सिर्फ़ Opus कोडेक इस्तेमाल किया जा सकता है.
  • ऑडियो सेटिंग को a=recvonly (सिर्फ़ सुनें) पर सेट करना ज़रूरी है.
  • ऑफ़र, नई लाइन के वर्ण \r\n या \n के साथ खत्म होना चाहिए.

मान्य ऑफ़र का उदाहरण देखें

बिना फ़ॉर्मैट किया गया:

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
फ़ील्ड ब्यौरा डेटा टाइप
offerSdp एक SDP ऑफ़र. यह उस लोकल डिवाइस के लिए खास होता है जिस पर WebRTC लाइव स्ट्रीम दिखेगी. string
Example: "offerSdp"

GenerateWebRtcStream के जवाब के फ़ील्ड

जवाब मिलने के 30 सेकंड के अंदर, लाइव स्ट्रीम जनरेट करने के लिए answerSdp का इस्तेमाल करना ज़रूरी है. ऐसा न करने पर, इसकी समयसीमा खत्म हो जाती है. अगर इसकी समयसीमा खत्म हो जाती है, तो नया answerSdp पाने के लिए, GenerateWebRtcStream निर्देश को फिर से चलाएं.

लाइव स्ट्रीम के लिए WebRTC चैनल खोलते समय, पक्का करें कि आपने वीडियो चैनल के साथ-साथ डेटा चैनल भी बनाया हो.

फ़ील्ड ब्यौरा डेटा टाइप
answerSdp एक SDP जवाब. इसका इस्तेमाल उस लोकल डिवाइस के साथ किया जाना है जिस पर WebRTC लाइव स्ट्रीम दिखेगी. string
Example: "answerSdp"
expiresAt वह समय जब आरएफ़सी 3339 फ़ॉर्मैट में, WebRTC लाइव स्ट्रीम का ऐक्सेस खत्म हो जाता है. string
Example: "2020-01-04T18:30:00.000Z"
mediaSessionId जनरेट की गई WebRTC लाइव स्ट्रीम का मीडिया सेशन आईडी. string
Example: "Tp-TEPvJ8Qseo3FShZCAFjXopl..."

ExtendWebRtcStream

Nest Cam (पुराना मॉडल) Nest Cam (आउटडोर या इंडोर, बैटरी वाला) Nest Cam with floodlight Nest Cam (इंडोर, तार वाला) Nest Doorbell (तार वाला)   तार वाला   

अनुरोध करें कि मौजूदा WebRTC लाइव स्ट्रीम का ऐक्सेस, उसकी समयसीमा खत्म होने से पहले बढ़ाया जाए.

WebRTC स्ट्रीम की समयसीमा सिर्फ़ तार से चलने वाले कैमरों के लिए बढ़ाई जा सकती है. चार्जिंग के लिए प्लग इन किए जाने पर, बैटरी से चलने वाले कैमरे को तार से चलने वाला कैमरा माना जाता है. अगर कैमरा बैटरी पावर पर है, तो चालू WebRTC स्ट्रीम की समयसीमा बढ़ाने के अनुरोध को अनदेखा कर दिया जाएगा.

कैमरे की लाइव स्ट्रीम के सेशन सिर्फ़ पांच मिनट के लिए मान्य होते हैं. अगर आपको लाइव स्ट्रीम की समयसीमा बढ़ानी है, तो जनरेट किए गए स्ट्रीम फ़ॉर्मैट के लिए, CameraLiveStreamtrait के ExtendFormatStream निर्देश का इस्तेमाल करें.

ExtendWebRtcStream का अनुरोध और जवाब

अनुरोध

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

जवाब

{
  "results" : {
    "expiresAt" : "2018-01-04T18:30:00.000Z",
    "mediaSessionId" : "Tp-TEPvJ8Qseo3FShZCAFjXopl..."
  }
}

ExtendWebRtcStream के अनुरोध के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
mediaSessionId उस WebRTC लाइव स्ट्रीम का मीडिया सेशन आईडी जिसकी समयसीमा बढ़ानी है. string
Example: "Tp-TEPvJ8Qseo3FShZCAFjXopl..."

ExtendWebRtcStream के जवाब के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
expiresAt वह नया समय जब आरएफ़सी 3339 फ़ॉर्मैट में, WebRTC लाइव स्ट्रीम का ऐक्सेस खत्म हो जाता है. string
Example: "2018-01-04T18:30:00.000Z"
mediaSessionId उस WebRTC लाइव स्ट्रीम का मीडिया सेशन आईडी जिसकी समयसीमा बढ़ाई गई है. string
Example: "Tp-TEPvJ8Qseo3FShZCAFjXopl..."

StopWebRtcStream

Nest Cam (पुराना मॉडल) Nest Cam (आउटडोर या इंडोर, बैटरी वाला) Nest Cam with floodlight Nest Cam (इंडोर, तार वाला) Nest Doorbell (बैटरी वाला) Nest Doorbell (तार वाला) 

इससे, मान्य WebRTC मीडिया सेशन अमान्य हो जाता है. साथ ही, उस सेशन से जुड़ी WebRTC लाइव स्ट्रीम बंद हो जाती है.

StopWebRtcStream का अनुरोध और जवाब

अनुरोध

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

जवाब

{}

StopWebRtcStream के अनुरोध के फ़ील्ड

फ़ील्ड ब्यौरा डेटा टाइप
mediaSessionId उस WebRTC लाइव स्ट्रीम का मीडिया सेशन आईडी जिसे बंद करना है. string
Example: "Tp-TEPvJ8Qseo3FShZCAFjXopl..."

गड़बड़ियां

इस ट्रेट से जुड़ी ये गड़बड़ियां दिख सकती हैं:

गड़बड़ी का मैसेज RPC समस्या का हल
कैमरा, स्ट्रीमिंग के लिए उपलब्ध नहीं है. FAILED_PRECONDITION कैमरा या तो ऑफ़लाइन है या किसी तकनीकी समस्या की वजह से स्ट्रीमिंग के लिए उपलब्ध नहीं है.
डोरबेल के लिए, यह निर्देश इस्तेमाल नहीं किया जा सकता. FAILED_PRECONDITION बैटरी से चलने वाले डोरबेल पर, WebRTC स्ट्रीम की समयसीमा नहीं बढ़ाई जा सकती. अगर डोरबेल पर किसी स्ट्रीम को शुरुआती सेशन की अवधि से ज़्यादा समय तक देखना है, तो मौजूदा स्ट्रीम को बंद करें और नई स्ट्रीम जनरेट करें.
अनुमति नहीं दी गई. PERMISSION_DENIED ने, Partner Connections Manager (पीसीएम) में, को निर्देश चलाने के लिए ज़रूरी डिवाइस-लेवल की अनुमतियां नहीं दी हैं.WebRTC लाइव स्ट्रीम जनरेट करते समय, इस गड़बड़ी का मतलब यह भी हो सकता है कि में ऑडियो सेटिंग गलत है. user developer

offerSdp

एपीआई की गड़बड़ी के कोड की पूरी सूची देखने के लिए, एपीआई की गड़बड़ी के कोड का रेफ़रंस देखें.