You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Experiencing Data Channel MediaHandler error after upgrading to 0.7.0 #175
Thanks for pointing this out. It was a subtle change that slipped my mind. I'll have to update the demo and documentation, but here's the gist of things:
Version 0.7.0 changes the MediaHandler and MediaStreamManager interfaces to use Promises instead of callbacks. It tries to be backward-compatible by patching callback-oriented custom implementations of MediaStreamManager (e3f7af6), but the particular implementation in the demo does not get patched since it defines acquire as having only one argument.
Here's an updated demo using version 0.7.0 with a Promise-oriented MediaHandler and MediaStreamManager. The section of code in question needed to be changed to:
/* Like a default mediaHandler, but no streams to manage */varself=newSIP.WebRTC.MediaHandler(session,{mediaStreamManager: {acquire: function(mediaHint){returnSIP.Utils.Promise.resolve([]);},release: function(stream){// no-op}}});returnself;
Also note that self.addStream is no longer overridden. It was changed to addStreams, which behaves correctly when there are no streams in the array returned by MediaStreamManager#acquire.
Activity
josephfrazier commentedon May 20, 2015
Thanks for pointing this out. It was a subtle change that slipped my mind. I'll have to update the demo and documentation, but here's the gist of things:
Version 0.7.0 changes the MediaHandler and MediaStreamManager interfaces to use Promises instead of callbacks. It tries to be backward-compatible by patching callback-oriented custom implementations of MediaStreamManager (e3f7af6), but the particular implementation in the demo does not get patched since it defines
acquireas having only one argument.Here's an updated demo using version 0.7.0 with a Promise-oriented
MediaHandlerandMediaStreamManager. The section of code in question needed to be changed to:Also note that
self.addStreamis no longer overridden. It was changed toaddStreams, which behaves correctly when there are no streams in the array returned byMediaStreamManager#acquire.Update full-demo-app with sip.js 0.7.0
hattmarris commentedon May 21, 2015
No problem, and thank you Joseph - I will give 0.7.0 another spin today. much appreciated - !
Matt
api/0.7.0 links to github release notes
josephfrazier commentedon May 22, 2015
Sure thing, let us know if run into any more bugs!