Closed wrfly closed 5 months ago
Hi @wrfly,
P2P Media Loader v1 features a new API. Please check the docs on how to use it: https://novage.github.io/p2p-media-loader/docs/latest
Hi @mrlika ,
Thanks for your reply, I've checked the documents, and the <script type="module">
works fine.
But I'm facing issue with webpack
. In the older versons, I just use:
import { Engine, initHlsJsPlayer } from 'p2p-media-loader-hlsjs';
but now when I import with
import { HlsJsP2PEngine } from 'p2p-media-loader-hlsjs';
the console reports error HlsJsP2PEngine not defined
in the js file compiled:
console.log(HlsJsP2PEngine);
was translated into
console.log(/* non-default import from non-esm module */undefined);
WARNING in ./src/ts/player.ts 3:12-26
export 'HlsJsP2PEngine' (imported as 'HlsJsP2PEngine') was not found in 'p2p-media-loader-hlsjs' (module has no exports)
WARNING in ./src/ts/player.ts 11:27-53
export 'HlsJsP2PEngine' (imported as 'HlsJsP2PEngine') was not found in 'p2p-media-loader-hlsjs' (module has no exports)
I'm new to javascript, apperaciate it if you could help, thanks!
Thanks for reporting. We will test with Webpack on Monday. Can you specify more details what frameworks are you using.
Please check in our repository: we have a React demo. It uses Vite. And we bundle it into our Astro website without any issues.
Thank you master!
Hi master @mrlika , the CI failed https://github.com/Novage/p2p-media-loader/actions/runs/9746617636/job/26898569591 and the npm haven't been updated. Could you help to retry? thanks!
Hi @wrfly, fixed. v1.0.2 released.
I upgraded the lib to v1.0.1 recently but got error
p2pml is not defined