Sergey Krashevich 95de3a1f3e Update openapi.yaml | 1 年之前 | |
---|---|---|
.. | ||
README.md | 1 年之前 | |
openapi.yaml | 1 年之前 |
Fill free to make any API design proposals.
Interactive OpenAPI.
www/stream.html
- universal viewer with support params in URL:
src=camera1&src=camera2...
mode=webrtc,webrtc/tcp,mse,hls,mp4,mjpeg
src=camera1&mode=webrtc&mode=mse&mode=mp4
width=320px
or percents width=50%
www/webrtc.html
- WebRTC viewer with support two way audio and params in URL:
media=video+audio
- simple viewermedia=video+audio+microphone
- two way audio from cameramedia=camera+microphone
- stream from browsermedia=display+speaker
- stream from desktopwww/video-rtc.js
www/video-stream.js
video-rtc.js
features:
Technology selection based on priorities:
Endpoint: /api/ws
Query parameters:
src
(required) - Stream nameRequest SDP:
{"type":"webrtc/offer","value":"v=0\r\n..."}
Response SDP:
{"type":"webrtc/answer","value":"v=0\r\n..."}
Request/response candidate:
{"type":"webrtc/candidate","value":"candidate:3277516026 1 udp 2130706431 192.168.1.123 54321 typ host"}
Request:
{"type":"mse","value":"avc1.640029,avc1.64002A,avc1.640033,hvc1.1.6.L153.B0,mp4a.40.2,mp4a.40.5,flac,opus"}
Response:
{"type":"mse","value":"video/mp4; codecs=\"avc1.64001F,mp4a.40.2\""}
Request:
{"type":"hls","value":"avc1.640029,avc1.64002A,avc1.640033,hvc1.1.6.L153.B0,mp4a.40.2,mp4a.40.5,flac"}
Response:
http://192.168.1.123:1984/api/hls/playlist.m3u8
{"type":"hls","value":"#EXTM3U\n#EXT-X-STREAM-INF:BANDWIDTH=1000000,CODECS=\"avc1.64001F,mp4a.40.2\"\nhls/playlist.m3u8?id=DvmHdd9w"}
Request/response:
{"type":"mjpeg"}