Skip to content

Error while initialising the Sdk via global module: "Uncaught TypeError: PureCloudWebrtcSdk is not a constructor" #165

@mayurdevani

Description

@mayurdevani

I'm using the Sdk via importing it as a global module using script tag. But I'm getting this error while initialising the Sdk.
Uncaught TypeError: PureCloudWebrtcSdk is not a constructor
I can see the typeof window.PureCloudWebrtcSdk is "object", and not really a "function". But I've found the workaround with using window.PureCloudWebrtcSdk.PureCloudWebrtcSdk instead of window.PureCloudWebrtcSdk.
i.e.
const sdk = new window.PureCloudWebrtcSdk.PureCloudWebrtcSdk({ accessToken: 'your access token' }); sdk.initialize();

This seems like a bug on the version-3 series. Can you please look into this and at least change the readme with the workaround I mentioned above until the issue is being fixed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions