googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

Difficulty with use in Next.js #903

Closed vispaduchuri closed 4 years ago

vispaduchuri commented 4 years ago

This is similar to #552, The Getting started steps to showcase the ES6 Imports, where we add certain links and scripts along with the Video-js tag in the index.html. In Next.js added these scripts in the custom _document.js. After adding the video-js tag, Video-js is shown for all pages of the website.

Followed few examples and all end up with player.ima is not a function error, how can I implement this in next.js?

arnaudcasame commented 4 years ago

Hi,

If you're using Webpack to bundle your project, you should be able to import the plugin successfully by following the steps of our ES6 imports guide