简体   繁体   中英

No audio in sipML5 with Firefox 58

With the recent release of Firefox Version 58 , I have encountered a no audio issue using sipML5, I suspect it has to do with the change they did where they completely removed mozSrcObejct and they recommend to use SrcObeject instead:

The prefixed version of HTMLMediaElement.srcObject has been removed; make sure code is updated to use the standard srcObject instead of mozSrcObject (bug 1183495).

I'm using the SIPml-api.js from doubango and there I see that they use this property in these two functions:

attachMediaStream = function (a, b) {
    console.log("Attaching media stream");
    a.mozSrcObject = b;
    a.play();
    return a
};
reattachMediaStream = function (b, a) {
    console.log("Reattaching media stream");
    b.mozSrcObject = a.mozSrcObject;
    b.play()
}

My question would be, how can I replace the prefixed mozsrcObject to use the standard srcObject, I tried just eliminating he prefix but that didn't work, any help would be appreciated.

Note that with Firefox version the original js from sipML5 works without a problem, and the console logs and webrtc logs looks the same.

我要做的就是替换a.srcObject而不是a.mozSrcObject,它现在可以在Firefox 58中使用

I also trying to make sipml5 working with firefox 58. Audio and Video both are not working. As per the suggestion, I changed srcObject but it did not make any difference. Still no audio and video.

// Attach a media stream to an element.
  attachMediaStream = function(element, stream) {
    console.log("Attaching media stream");
    element.srcObject = stream;
    element.play();
    return element;
  };

  reattachMediaStream = function(to, from) {
    console.log("Reattaching media stream");
    to.srcObject = from.srcObject;
    to.play();
  };

I found people are suggesting to use navigator.mediaDevices.getUserMedia in place of navigator.mozGetUserMedia as navigator.mediaDevices has now become common for all the browsers. But when we change it, simpl5 stops working.

Is there any other way to look around to fix the issue?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM