Open darwinva97 opened 3 years ago
Similar issue in flv.js: https://github.com/bilibili/flv.js/issues/565
I'm not familiar with Server-side rendering.
Could you comment this line and then recompile the library (npm run build
), and then compile with Gatsby?
https://github.com/xqq/mpegts.js/blob/master/src/mpegts.js#L32
https://github.com/xqq/mpegts.js/blob/master/src/mpegts.js#L19
Also the import code should also be commented, AFAIK
I would suggest using mpegts.js
as an external script, it might take more efforts to adapt current codes for SSR.
I am trying to run the compiler of my application made with Gatsby and mpegts.js but I get this error. I should add that there are no errors with the Gatsby development server, only in the compilation.
I have noticed that it is based on flv.js. I have tried to do it with that library even though it no longer has constant maintenance and I get a similar error: "self is not defined" and a similar output. I'll create the issue anyway in flv.js and comment on its link here.
versions: node: v16.3.0 npm: 7.18.1 yarn: 1.22.10
package.json:
Full output when executing "yarn build": output.txt