3 ms·
Right, I understand it's more general, but there is a use cases section in the explainer that putting this there might have value. In other cases where encrypt
by kodablah 7y ago
Right, I understand it's more general, but there is a use cases section in the explainer that putting this there might have value.
In other cases where encryption is used (e.g. fetch, webrtc itself, etc), often we ask the browser to do it due to, among other things, the performance benefit of not doing it in JS or WASM. I'd have to test using window.crypto.subtle.encrypt or tweetnacl something to check the overhead (I do see the webcodec examples show a write/readable stream which allows promise-based encryption). Arguably this could have been done at the conn level w/ raw RTC data instead of the media stream level so I wouldn't have to handle data channels separately, but I see the value in sharing with other use cases of client-side stream manip.