Please give a brief summary of your issue:
(Think of this as an email subject)
Trying to view video through VideoViewer library but getting JS issue and not loading video in frame.
webviewer-core.min.js:296 ERROR TypeError: Cannot read properties of undefined (reading 'dispatchEvent')
at webviewer-core.min.js:839:143
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Simple load any online video through URL will throw error.
Please provide a link to a minimal sample where the issue is reproducible:
Thanks for your reply with docs. I m following same docs
and there its not loading video with Video Library.
Below is the code I implemented.
loadVideoInWebViewer() {
WebViewer({
path: 'assets/lib/webviewer',
selectAnnotationOnCreation: true,
},
this.viewer.nativeElement,
).then(async instance => {
// Extends WebViewer to allow loading HTML5 videos (.mp4, ogg, webm).
console.log('WebViewer is ready');
const {
loadVideo,
} = await initializeVideoViewer(
instance,
{
license: '---- Insert commercial license key here after purchase ----',
}
);
console.log('VideoViewer is ready');
// Load a video at a specific url. Can be a local or public link
// If local it needs to be relative to lib/ui/index.html.
// Or at the root. (eg '/video.mp4')
const videoUrl = 'https://pdftron.s3.amazonaws.com/downloads/pl/video/video.mp4';
loadVideo(videoUrl, <LoadVideoOptions>{
fileName: 'video.mp4',
});
}).catch(err => console.error(err));
}
But still its throwing above error which I mention in my issue.