npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

videoplay_ref

v1.0.5

Published

基于vue3封装的视频播放功能,包括进度条、点击播放、视频加倍播放,视频播放进度

Downloads

36

Readme

1、下载

npm i videoplay_ref

2、引入

//本地引入
 import { Video } from '@/assets/utils/videoplay_ref.js';
//模块引入
import {video} = require('videoplay_ref.js');

import {Video } from 'videoplay_ref';

3、设置自动播放

自动播放需要 需要设置自定义属性  data-isPlay 或 isPlay  任意一种都行	
<video autoplay muted playsinline  data-isPlay="true" isPlay="true">
//一个页面只用一个视频 可通过IsPlay(true) ; 最好不用

4、Api 说明

Video() , 视频 ,值可以 是 name =ref() , 也可以十字符串 id 名或 class 名字#id 或 .class
Duration 显示视频总时长, 值同上 , 控制innerText
CurrentTimes 显示播放进度时间 ,值同上innerText
IsPlay('值'); 值 boolean, 如果设置自动播放需要设置,最好不用
startPlay 开始播放按钮 值同上
pausePlay 暂停播放按钮 直同上
VideoAdvance 快进按钮,值同上
VideoBack 快退按钮, 值同上

Videomuted 控制静音 , 值同上 ,按钮,
Volume0 控制音量 增加 值同上 ,按钮
Volume1 控制音量 减少 值同上, 按钮

VideoProgress 进度条 值同上 ,视频播放时候修好value值 0 - 100 ,input 事件
PlaybackRate 值同上 , 控制播放倍数
VideoSpeed 设置快进速度 值 number

5、播放倍数说明

          <span class ="speedSelect">
              <select >
                <option value="0.5">0.5倍</option>
                <option value="1.0" selected>1.0倍</option>
                <option value="1.5">1.5倍</option>
                <option value="2.0">2.0倍</option>
              </select>
          </span>
          <script>
          	PlaybackRate('speedSelect')
          <script>
 //抖音号: 磊哥带你飞