Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

OT is not defined React.js #56

Closed
saadpasta opened this issue Feb 27, 2019 · 4 comments
Closed

OT is not defined React.js #56

saadpasta opened this issue Feb 27, 2019 · 4 comments

Comments

@saadpasta
Copy link

I am trying to use OT.checkSystemRequirements() but when I am using it's giving an error OT is not defined I have installed the library and added script file can someone tell me how to get OT.

@msach22
Copy link
Contributor

msach22 commented Apr 9, 2019

@saadpasta Have you installed the OpenTok JS SDK. You can add it using the @opentok/client package on NPM or the JS SDK link here:
<script src="https://static.opentok.com/v2/js/opentok.min.js"></script>

@brianbodollo
Copy link

brianbodollo commented Apr 17, 2019

Wrap your component with preloadScript.

import {preloadScript} from 'opentok-react'

const SomeComponent = () => {
  // do your thing
}

export default preloadScript(SomeComponent)

@msach22
Copy link
Contributor

msach22 commented May 9, 2019

Thanks for helping @brianbodollo.

I'm going to go ahead and close this issue.

@msach22 msach22 closed this as completed May 9, 2019
@ghost
Copy link

ghost commented Jun 3, 2019

Wrap your component with preloadScript.

import {preloadScript} from 'opentok-react'

function SomeComponent {
  // do your thing
}

export default preloadScript(SomeComponent)

thank you so much my friend, this fixed my issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants