更新: | 2020-04-24 |
---|---|
作者: | @voluntas |
バージョン: | 2020.1 |
URL: | https://voluntas.github.io/ |
- W3C WebRTC API は理解している
- WebRTC 利用プロトコルは一通り理解している
- WebRTC SFU を仕事で利用している
WebRTC Insertable Streams は Chrome M83 から利用できる RTP パケタライズ前のデータを JavaScript から直接いじれるようになる仕組みです。
- RTP パケタライズ前ということもあり、分割を意識する必要はありません
- RTP パケタライズ前の payload を自由にできるようになります
- 音声データにモーションデータをつけたりできるようになります
- E2EE が実現できるようになります
RTCPeerConnection を作るときに forceEncodedVideoInsertableStreams と forceEncodedAudioInsertableStreams を有効にする必要があります。
音声とモーションデータだけであれば、音声だけを有効にすれば大丈夫です。
let pc = new RTCPeerConnection({ forceEncodedVideoInsertableStreams: true, forceEncodedAudioInsertableStreams: true }); function transform(chunk, controller) { controller.enqueue(chunk); }; let senderTransform = new TransformStream({ transform: transform }); senderStreams.readableStream, senderStreams.writableStream readableStream.pipeThrough(transformStream) .pipeTo(writableStream);
- WebRTC Insertable Streams - Chrome Platform Status
- WebRTC Insertable Media using Streams
- alvestrand/webrtc-media-streams: Insertable Streams API for WebRTC
- WebRTCWG-2020-02-27 - Google スライド
- Insertable Streams (Harald)
- Insertable Media Processing
- Harald Alvestrand TPAC 2019
- Trial for WebRTC Insertable Streams
- 2020 年 9 月 30 日まで