Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
larkplayer
Advanced tools
An extendable html5 video player, includes event, plugin and custom style :)
中文|English
larkplayer 是一款轻量、可扩展的 html5 播放器。
核心在于插件化的机制,使得播放器可以像高达一样可拆卸和组装,从而舒适地支持业务从简单到复杂的演变。
相关功能通过插件提供,请参考下文的插件章节
查看在线示例
NPM
npm install larkplayer
CDN
<script src="https://unpkg.com/larkplayer@latest/dist/larkplayer.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>larkplayer quick start</title>
</head>
<body>
<video id="my-video" src="https://baikebcs.bdimg.com/baike-other/big-buck-bunny.mp4" width="400" height="300" controls>
请升级浏览器以支持 html5 video
</video>
<script type="text/javascript" src="https://unpkg.com/larkplayer@latest/dist/larkplayer.js"></script>
<script type="text/javascript">
// js 文件以 umd 的形式包装,以 script 的形式引用时,larkplayer 会直接挂载在 window 上
var player = larkplayer('my-video', {
width: 640,
height: 360
}, function () {
console.log('player is ready');
});
player.on('firstplay', function () {
console.log('firstplay');
});
// 支持所有的 html5 标准事件
player.on('play', function () {
console.log('play');
});
player.on('ended', function () {
console.log('ended');
player.src('http://www.w3school.com.cn/i/movie.ogg');
player.play();
});
</script>
</body>
</html>
import larkplayer from 'larkplayer';
const player = larkplayer('video-el');
QQ 群:860073225
larkplayer is MIT licensed
FAQs
An extendable html5 video player, includes event, plugin and custom style :)
We found that larkplayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.