I am working with opentok or tokbox library using vanillaJS. I am struggling to add the username parameter. Please help me to fix the issue or guide me where I am wrong.
Below is my code.
initOptions() {
this.options = {
credentials: {
apiKey: Constant.VonageApiKey,
sessionId: this.sessionId,
token: this.token
},
streamContainers: function streamContainers(pubSub, type, data) {
return {
publisher: {
camera: '#cameraPublisherContainer',
screen: '#screenPublisherContainer',
},
subscriber: {
camera: '#cameraSubscriberContainer',
screen: '#screenSubscriberContainer',
},
}[pubSub][type];
},
controlsContainer: '#controls',
packages: ['screenSharing', 'annotation'],
communication: {
callProperties: null, // Using default
},
screenProperties: {
name: "Testing"
},
screenSharing: {
extensionID: 'plocfffmbcclpdifaikiikgplfnepkpo',
annotation: true,
externalWindow: false,
dev: true,
screenProperties: null, // Using default
},
annotation: {
// absoluteParent: {
// publisher: '.video-call',
// subscriber: '.video-call'
// }
},
// archiving: {
// startURL: 'https://example.com/startArchive',
// stopURL: 'https://example.com/stopArchive',
// },
}
}
Any solution appreciated!