Last active
August 16, 2020 01:22
-
-
Save cpv123/5896c794d27fd81366f1cdeb5ee557a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ScriptLoader from 'react-render-props-script-loader'; | |
import JitsiView from './JitsiView'; | |
const JitsiContainer = props => { | |
// Prepare config e.g. user and room names | |
const userConfig = { ... } | |
const roomConfig = { ... } | |
return ( | |
<ScriptLoader | |
type="text/javascript" | |
src="https://meet.jit.si/external_api.js" | |
> | |
{({ loading, error }) => { | |
if (error) return <ErrorState />; | |
if (loading) return <LoadingState />; | |
return ( | |
<JitsiView | |
userConfig={userConfig} | |
roomConfig={roomConfig} | |
/> | |
) | |
}} | |
</ScriptLoader> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment