Uncaught TypeError: window.Plivo is not a constructor

1.2k Views Asked by At

When initializing plivo it shows an error ->

Uncaught TypeError: window.Plivo is not a constructor

var options = {
                "debug": "DEBUG",
                "permOnClick": true,
                "audioConstraints": {
                    "optional": [{
                        "googAutoGainControl": false
                    }, {
                        "googEchoCancellation": false
                    }]
                },
                "enableTracking": true
            };

plivoBrowserSdk = new window.Plivo(options);

earlier this was working fine with no warning or error message. but it shows error from past 1 month. Is there any update is done by plivo on plivo browsersdk. ?

1

There are 1 best solutions below

0
D S NEGI On

There was an attempt to use an object or a variable as a constructor, but that object or variable is not a constructor. See constructor or the new operator for more information on what a constructor is.

There are many global objects, like String or Array, which are constructable using new. However, some global objects are not and their properties and methods are static. The following JavaScript standard built-in objects are not a constructor: Math, JSON, Symbol, Reflect, Intl, SIMD, Atomics.