Closed nvtienlg closed 2 months ago
Hi @nvtienlg, I think Node polyfills required by bittorrent-tracker
package are missing. Check our Vite config for the reference: https://github.com/Novage/p2p-media-loader/blob/main/demo/vite.config.ts
thank you very much @mrlika . it works
Hello,
I created a vanilla js project using Vite, import this lib will result in mentioned error
npm create vite@latest ... npm install p2p-media-loader-hlsjs hls.js
in main.js
import Hls from 'hls.js'; import { HlsJsP2PEngine } from 'p2p-media-loader-hlsjs';
If i try using importmap method then everything is fine. But since importmap is not fully supported by all browsers, so i prefer to use npm method. Can you check this?