Files
go2rtc/www
Sergey Krashevich ab27a042c1 feat(homekit): add HKSV support with motion detection and doorbell functionality
- Introduced HKSV configuration options in homekit.go, allowing for motion detection and doorbell features.
- Implemented API endpoints for triggering motion detection and doorbell events.
- Enhanced server.go to handle HKSV sessions and manage motion detection states.
- Created new accessory types for HKSV and doorbell in accessory.go.
- Added support for audio recording configurations in ch207.go.
- Defined new services for motion detection and doorbell in services_hksv.go.
- Implemented opack encoding/decoding for HDS protocol in opack.go and protocol.go.
- Updated OpenAPI documentation to reflect new endpoints and features.
- Extended schema.json to include HKSV configuration options.
2026-03-04 13:53:17 +03:00
..
2026-01-01 05:24:45 +01:00
2026-01-17 13:57:05 +03:00
2025-11-26 11:24:57 +03:00
2025-11-26 11:24:57 +03:00
2025-11-25 20:14:00 +03:00
2026-01-17 13:47:21 +03:00
2026-02-06 21:45:55 +03:00
2026-01-17 13:57:05 +03:00
2025-12-14 22:35:58 +03:00
2023-07-11 15:03:27 +03:00

www

This folder contains static HTTP and JS content that is embedded into the application during build. An external developer can use it as a basis for integrating go2rtc into their project or for developing a custom web interface for go2rtc.

HTTP API

www/stream.html - universal viewer with support params in URL:

  • multiple streams on page src=camera1&src=camera2...
  • stream technology autoselection mode=webrtc,webrtc/tcp,mse,hls,mp4,mjpeg
  • stream technology comparison src=camera1&mode=webrtc&mode=mse&mode=mp4
  • player width setting in pixels width=320px or percents width=50%

www/webrtc.html - WebRTC viewer with support two way audio and params in URL:

  • media=video+audio - simple viewer
  • media=video+audio+microphone - two way audio from camera
  • media=camera+microphone - stream from browser
  • media=display+speaker - stream from desktop

JavaScript API

  • You can write your viewer from the scratch
  • You can extend the built-in viewer - www/video-rtc.js
  • Check example - www/video-stream.js
  • Check example - https://github.com/AlexxIT/WebRTC

video-rtc.js features:

  • support technologies:
    • WebRTC over UDP or TCP
    • MSE or HLS or MP4 or MJPEG over WebSocket
  • automatic selection best technology according on:
    • codecs inside your stream
    • current browser capabilities
    • current network configuration
  • automatic stop stream while browser or page not active
  • automatic stop stream while player not inside page viewport
  • automatic reconnection

Technology selection based on priorities:

  1. Video and Audio better than just Video
  2. H265 better than H264
  3. WebRTC better than MSE, than HLS, than MJPEG

Browser support

ECMAScript 2019 (ES10) supported by iOS 12 (iPhone 5S, iPad Air, iPad Mini 2, etc.).

But ECMAScript 2017 (ES8) almost fine (es6 + async) and recommended for React+TypeScript.

Known problems

  • Autoplay doesn't work for WebRTC in Safari read more.