Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html中引用js完全无法正常工作 #12

Open
foxfire881 opened this issue Feb 2, 2024 · 1 comment
Open

html中引用js完全无法正常工作 #12

foxfire881 opened this issue Feb 2, 2024 · 1 comment

Comments

@foxfire881
Copy link

foxfire881 commented Feb 2, 2024

https://tiny-player.vercel.app/page/001-%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B.html
作者写的文档测试过吗?按照文档中给的demo代码完全无法正常工作,报错不能引入外部模块,查看源码发现居然还import 了 hls.js,但是手工把hls.js下载到本地还是没法正常工作。

建议作者编写文档前先测试一下,跑不通的代码就不要写demo了,浪费了一下午时间。

<div id="tiny-player"></div>
<script src="tiny-player.min.js"></script>
<!-- 或者使用 cdn 👇🏻 -->
<!-- <script src="https://unpkg.com/tiny-player"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script> -->
<script>
  const tp = new TinyPlayer({
    container: document.getElementById('tiny-player'),
    src: 'demo.mp4',
  })
</script>
@leoFitz1024
Copy link

确实存在这个问题: ##10 我也碰到过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants