Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

Support for ORTC, more specifically MS Edge #10

Closed virtualfunction closed 8 years ago

virtualfunction commented 9 years ago

Hi, I'm relatively new to all this WebRTC stuff so trying to get my head round the various edge cases etc.

I see ORTC has landed in from about build 10572 of Windows 10. Is there any plans for Kurento to support this? I'm raising it here as I see it as a feature request, and I think it's fairly valid one given:

My understanding is that currently in WebRTC all negotiation relating to media / transport (ICE) etc is done using SDP which is not used at all in the ORTC flavour. While it's a pain MS have chosen a different path from Chrome / FF, it seems logical from a technical perspective as SDP is arcane at best to most. I get the impression that ORTC might be introduced as something that can sit underneath SDP offer/answer negotiation.

From what I can see there is an ORTC-adapter.js project out there that translates ORTC calls into SDP offers, but the implementation currently seems rough on the edges (there were a few unimplemented methods on RTCPeerConnection kurento-utils tried calling - addEventListener was one, and it seems fussy over things like the format of the urls option iceCandidates when using freeice (I think this generates an array, where as the adapter just expects a string). My testing was limited to just adding the ortc-adapter.js as a script tag to one of the existing one-to-many demo and running in MS Edge build 10576 and watching the console. I'm sure there's a few other issues that will come out further on, but I'm not versed well enough in WebRTC to itemise these. If I gain some time / experience in due course I'll try and add to this.

virtualfunction commented 9 years ago

OK, had another quick stab at looking at this. Replacing addEventListener with respective on* = function equivalents seems to work. From what I see things get up to the SDP answer phase but fall short as soon as setRemoteDescription gets called. Whatever is being passed to RTCIceTransport#start is failing (guessing it's throwing InvalidParameters), and subsequent RTCIceTransport#addRemoteCandidate calls are failing with InvalidStateError. This seems to happen on the second call so I suspect it's related to https://github.com/twilio/ortc-adapter/issues/4

Also get this occasionally on the server side - guessing this is due to SDP generated from ortc-adapter rather an a Kurento thing

Connection 6 received signal  { type: 'on_ice_candidate',
  candidate:
   { candidate: 'a=candidate 1 1 udp 2130706431 10.0.2.15 14562 host generation 0',
     sdpMLineIndex: 0 } }
/var/www/kurento-one2many-call/node_modules/kurento-client/node_modules/checktype/index.js:103
    throw SyntaxError(key+" param is required");
    ^

SyntaxError: iceCandidateDict.sdpMid param is required
    at SyntaxError (native)
    at checkType (/var/www/kurento-one2many-call/node_modules/kurento-client/node_modules/checktype/index.js:103:11)
    at new IceCandidate (/var/www/kurento-one2many-call/node_modules/kurento-client/node_modules/kurento-client-elements/lib/complexTypes/IceCandidate.js:50:3)
    at Object.IceCandidate (/var/www/kurento-one2many-call/node_modules/kurento-client/node_modules/kurento-client-elements/lib/complexTypes/IceCandidate.js:44:12)
    at on_ice_candidate (/var/www/kurento-one2many-call/server.js:86:49)
    at WebSocket.socket.on.dispatch (/var/www/kurento-one2many-call/server.js:172:20)
    at emitTwo (events.js:92:20)
    at WebSocket.emit (events.js:172:7)
    at Receiver.ontext (/var/www/kurento-one2many-call/node_modules/ws/lib/WebSocket.js:797:10)
    at /var/www/kurento-one2many-call/node_modules/ws/lib/Receiver.js:473:18
igracia commented 9 years ago

Yes, that seems related to the fact that ORTC-adapter doesn't include the sdpMid field. Also, you might find some other issues, like the one with the addEventListener not being there, and having to resort to on things, as IE does not support them.

About ORTC, we are not planning on opening that can of worms right now. That would be spreading ourselves too thin, and we can't do that at the moment.

virtualfunction commented 9 years ago

OK, I'll see how far I can get with the ORTC adapter and poke them in the mean time. I gathered this is long term thing that would need to be done in the next major release. I guess the other thing is the WebRTCEndPoint extends from SdpEnpoint so it's quite intertwined.

igracia commented 9 years ago

Yes, it's quite intertwined at the moment. It is also not the 1st priority right now to provide support for edge, as they haven't even reached 1% of the market share yet, and it seems that it's not gaining traction.

In any case, don't despair, as we are keeping an eye on that. It's something we won't miss for sure, but it just that we are not rushing to get there ;-)

I think we can close this issue, unless you want to keep it open for some reason.

igracia commented 8 years ago

As there are no updates for some time, I'm closing the issue.

Joe-Palmer commented 8 years ago

I'd love to see MS Edge support, apparently they are adding VP9 soon:

https://blogs.windows.com/msedgedev/2015/09/08/announcing-vp9-support-coming-to-microsoft-edge/

Will Kurento support VP9?