ANi*_*sus 8 rtp websocket webrtc
除其他外,WebRTC用于实时浏览器到浏览器媒体通信,但在我的情况下,它将用于浏览器到服务器的音频通信.
根据我收集的信息,使用RTP over UDP传输MediaStream.
除了用于信令的协议之外,这将需要至少两个额外的端口,这是我想要避免的.
在WebRTC中,是否有可能在Websocket上使用RTP而不是在UDP上使用RTP,这样我只需要使用端口80或443?
No, that will not be possible using WebRTC.
WebRTC was built to give browsers three main features:
This features are accessible to web applications via a Javascript API defined here. To access media devices, you can use getUserMedia() and you will get a MediaStream to attach to HTML5 audio and video tags. To create an SRTP session, you need to create a peer connection and manage the streams to use.
You have to request the browser a media SDP offer and send it to the other party using any protocol (e.g. websockets). When the other party receives your SDP offer, it can inject it into the browser, request an SDP answer, and send it back. Once both browsers have the offers, they start the SRTP negotiation, using ICE.
So, you will not have access to RTP packets to send them over websockets.
| 归档时间: |
|
| 查看次数: |
10484 次 |
| 最近记录: |