- From: Tony Herre via GitHub <sysbot+gh@w3.org>
- Date: Thu, 01 Aug 2024 11:14:01 +0000
- To: public-webrtc-logs@w3.org
@youennf what's the purpose of the `RTCRtpTransportHandler` object in [your suggestion](https://github.com/w3c/webrtc-rtptransport/issues/33#issuecomment-2191647460)?
I can't think of any usecase where an app wouldn't just always do `rtpTransport.handler = new RTCRtpTransportHandler(worker, message, transfer);`.
If we took that approach, wouldn't it work as well to just have a method directly on RTCRtpTransport:
```
interface RTCRtpTransport {
Promise addRtpSendStream(RTCRtpSendStreamInit);
Promise addRtpReceiveStream(RTCRtpReceiveStreamInit);
// Causes RTCRtpTransportProcessorEvent to be fired on |worker|.
createProcessor(Worker worker, optional any options, optional sequence<object> transfer);
}
[Exposed=DedicatedWorker]
interface RTCRtpTransportProcessor {
...
};
[Exposed=DedicatedWorker]
interface RTCRtpTransportProcessorEvent : Event {
readonly attribute RTCRtpTransportProcessor processor;
};
partial interface DedicatedWorkerGlobalScope {
attribute EventHandler onrtcrtptransport;
};
```
thus saving us an interface and a lot of theoretical corner cases around Handler lifecycles.
--
GitHub Notification of comment by tonyherre
Please view or discuss this issue at https://github.com/w3c/webrtc-rtptransport/issues/33#issuecomment-2262781600 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 1 August 2024 11:14:02 UTC