DoubangoTelecom / sipml5

The world's first HTML5 SIP client (WebRTC)
BSD 3-Clause "New" or "Revised" License
939 stars 456 forks source link

Error c.pluginObj.bindEventListener is undefined - in Safari@MacOS (with a webrtc plugin) #271

Open shershen08 opened 7 years ago

shershen08 commented 7 years ago

I am getting this error when calling c.pluginObj.bindEventListener( in attachMediaStream method in the SIPml-api.js file.

attachMediaStream = function(c, g) {
            console.log("Attaching media stream");
//..
 if (c.pluginObj) {
                        c.pluginObj.bindEventListener("play", function(k) {
                            if (c.pluginObj) {
                                if (c.pluginObj.getAttribute("autowidth") && k.videoWidth) {
                                    c.pluginObj.setAttribute("width", k.videoWidth)
                                }
                                if (c.pluginObj.getAttribute("autoheight") && k.videoHeight) {
                                    c.pluginObj.setAttribute("height", k.videoHeight)
                                }
                            }
                        });
                        c.pluginObj.src = g
                    }
//..

Trying to run sipml5 on Safari 9 on MacOS 10.8 after installing the webrtc-everywhere plugin. adapter.js file is included on the page.