We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I am trying the library with React and the h5p-test file provided in this repository.
I am getting a result, but is blank.
My code (a wrapper around React, but in the end is just React) look like:
export default client => { const divId = 'h5p-container'; const h5pJsonFolder = 'https://some-remote-storage'; const options = { h5pJsonPath: `${h5pJsonFolder}/h5p-test`, // h5pJsonPath: `${h5pJsonFolder}/video-1-fisiologia-capilar`, frameJs: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/main.bundle.min.js', frameCss: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/styles/h5p.min.css', fullScreen: true, }; return client.Component({ inState() { return { H5P: null, player: null, }; }, didMount(props, store) { async function startComponent() { const { H5P } = store.getInState(); if (!H5P) { const { H5P: H5PStandalone } = await import('h5p-standalone'); const element = document.getElementById(divId); console.log('🚀 > element:', element); const player = await new H5PStandalone(element, options); store.setInState({ H5P: H5PStandalone, player, }); } } setTimeout(() => startComponent(), 5000); }, render({ props, inState, css }) { const { H5P, player, } = inState; console.log('🚀 > H5P:', H5P); console.log('🚀 > player:', player); return ( <div id={divId}> </div> ); }, }); };
I also tried making h5pJsonFolder a local one, but same result. Console are not showing errors.
h5pJsonFolder
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, I am trying the library with React and the h5p-test file provided in this repository.
I am getting a result, but is blank.
My code (a wrapper around React, but in the end is just React) look like:
I also tried making
h5pJsonFolder
a local one, but same result.Console are not showing errors.
Thanks
The text was updated successfully, but these errors were encountered: