Giter Site home page Giter Site logo

Comments (4)

cnadeau avatar cnadeau commented on September 18, 2024 2

Found how to import it from TypeScript:

import '@opentok/client';
declare var OT: any;

from opentok-network-test-js.

dmitryshur avatar dmitryshur commented on September 18, 2024 1

I'm sorry, but declaring OT as any is not a solution. there is a type error here and it's in the ScreenSharingCapabilityResponse type. this is what ScreenSharingCapabilityResponse looks like in @opentok/client:

  export type ScreenSharingCapabilityResponse = {
    extensionInstalled?: boolean;
    supported: boolean;
    supportedSources: {
      application?: boolean;
      screen?: boolean;
      window?: boolean;
    };
    extensionRequired?: string;
    extensionRegistered?: boolean;
  };

this is what it looks like in opentok-network-test-js:

  export interface ScreenSharingCapabilityResponse {
    extensionInstalled: boolean;
    supported: boolean;
    supportedSources: {
      application: boolean;
      screen: boolean;
      window: boolean;
    };
    extensionRegistered?: string;

the definition for extensionInstalled conflicts.

from opentok-network-test-js.

cnadeau avatar cnadeau commented on September 18, 2024

🤔 according to this test, it should be import * as OT from '@opentok/client

but, from the sample (in JS, not in TypeScript), commenting the opentok.min.js script and importing OT here as import OT from '@opentok/client works

it's definitely a typescript error

from opentok-network-test-js.

jgbpercy avatar jgbpercy commented on September 18, 2024

Please see this stackblitz for a minimal reproduction.

from opentok-network-test-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.