WebViewer Version:
- WebViewer = 10.12.0
- WebViewer Video = 4.35.7
- WebViewer Audio = 2.21.7
Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No
Please give a brief summary of your issue:
Error loading webviewer-video/main.js: Uncaught TypeError: Cannot read properties of undefined (reading ‘forwardRef’)
Error loading webviewer-audio/main.js: Uncaught TypeError: Cannot read properties of undefined (reading ‘useLayoutEffect’)
Please describe your issue and provide steps to reproduce it:
My main issue is I don’t really know how to get WebViewer Video running in vanilla Javascript, without React. The sample seems to be in react. I did find this sample on GitHub:
webviewer-video-sample/samples/compare/index.html at master · ApryseSDK/webviewer-video-sample (github.com)
I modified the HTML file to just this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MyVideo.mp4</title>
<script src='/static/node_modules/@pdftron/webviewer/webviewer.min.js' crossorigin></script>
<script src='/static/node_modules/@pdftron/webviewer-video/dist/main.js' crossorigin></script>
<script src='/static/node_modules/@pdftron/webviewer-audio/dist/main.js' crossorigin></script>
</head>
<body>
</body>
</html>
The contents of /static/lib/WebViewerVideo and /static/lib/WebViewerAudio are the node packages.
When I run that I get the following results:
Uncaught TypeError: Cannot read properties of undefined (reading 'forwardRef')
at 3220 (main.js:2:195247)
at o (main.js:2:906870)
at 5656 (main.js:2:203202)
at o (main.js:2:906870)
at 5502 (main.js:2:888028)
at o (main.js:2:906870)
at 9468 (main.js:2:208529)
at o (main.js:2:906870)
at 9052 (main.js:2:897103)
at o (main.js:2:906870)
(index)
Value
WebViewer Audio version '2.21.7'
<a printout of the WebViewer Audio object>
main.js:6 Uncaught TypeError: Cannot read properties of undefined (reading 'useLayoutEffect')
at Object.<anonymous> (main.js:6:16931)
at Object.<anonymous> (main.js:6:17113)
at n (main.js:1:552)
at Module.<anonymous> (main.js:144:3568)
at n (main.js:1:552)
at Object.<anonymous> (main.js:6:19906)
at n (main.js:1:552)
at Object.<anonymous> (main.js:135:20973)
at n (main.js:1:552)
at main.js:1:1351
Is it possible to run WebViewer Video / Audio without React or do I need to make the app a React application?