
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
@vf.js/videoplayer
Advanced tools
npm i @vf.js/videoplayer --save-dev
import { VFVideoPlayer } from '@vf.js/videoplayer'
const player = new VFVideoPlayer({
// 选择器
id: 'mse', // 需要手动添加<div id="mse"></div>
// 自动播放,部分设备有效
autoplay: true,
// 封面图
poster:'//img.alicdn.com/tps/TB1EXIhOFXXXXcIaXXXXXXXXXXX-760-340.jpg',
// 要播放的视频,至少1个
urls:[
{
name: '超清',
url: '//player.alicdn.com/video/editor.mp4',
default: true, // 默认要播放的清晰度
},
{
name: '高清',
url: '//player.alicdn.com/video/editor.mp4'
},
{
name: '标清',
url: '//player.alicdn.com/video/editor.mp4'
}
],
nativeTextTrack: [ // 可选
{
src: "//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/textTrack-1.vtt",
label: "字幕1",
default: true, // 默认要播放的字幕
},
{
src: "//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/textTrack-2.vtt",
label: "字幕2",
default: false
}
],
// 内联模式 https://webkit.org/blog/6784/new-video-policies-for-ios/
// 该选项在手机观看时,开启ios和微信的内联模式
playsinline: true,
// volume: 0.6, // 音量(默认0.6)
// width: 600, // 宽度(默认600)
// height: 337.5,// 高度(默认337.5)
// playbackRate: [0.5, 1],// 播放速度
// 画中画
// pip: true,
});
player.width = '1000px';
player.height = '1000px';
player.currentTime = 10; // 获取或设置视频的播放时间(秒)
player.play(); // 播放
player.pause(); // 暂停
player.destroy(); // 播放器销毁
// 事件监听
player.on('play',function(){
});
new VFVideoPlayer({
playNext: {
urlList: [
'url1',
'url2',
'url3'
],
}
});
修复卸载视频,重新创建时,进度条异常
修复进度条异常
// 获取当前视频截图:
player.vfScreenShot()
// 获取当前视频截图,指定目标的宽高:
player.vfScreenShot(100,100)
// 视频标题
title: '1. 这是一个测试视频',
// 视频时长(秒)
duration: 91
FAQs
``` ts npm i @vf.js/videoplayer --save-dev ```
We found that @vf.js/videoplayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.