Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
How to pass name in Opentok library using javascript?

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!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!