New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

d-video

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d-video

html5 video player just pc

  • 1.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

d-video

基于原生js的 video 插件  Dvideo

QQ交流群: 424418160

支持音量  语速  清晰度 ie全屏等一系列操作  兼容IE 9 +

项目运行

✅ clone 项目之后在项目根目录执行 安装依赖:

  npm install

⚠️ 注意: 由于webpack使用的是4.0以上的版本,extract-text-webpack-plugin在安装时需要单独执行,Vue下需要配置scss的sass-loader  安装sass-loader和node-sass

  npm install extract-text-webpack-plugin@next

来安装 否则项目安装之后执行 npm run dev 会报错 开启服务:

npm run dev

编译版本

  npm run build

原先的es5版本也会同时更新  后续会放在这个项目单独的文件下

初始化
var video = new Dvideo ({
	ele: '#testVideo',
	title: 'Pneumatic Tokyo - EnV',
	nextVideoExtend: function () {
		alert('您点击了下一页')
	},
	showNext: true,
	width: '580px',
	height: '292px',
	src: 'http://www.daiwei.org/index/video/EnV%20-%20PneumaticTokyo.mp4',
	autoplay: true,
	setVideoDefinition: function (type, e, current) {
		if (type === '0') {
			alert('你点击了标清')
			// video.setVideoInfo('這是標清','这里填写视频的标清地址',current)
		}
		if (type === '1') {
			alert('你点击了标清')
			// video.setVideoInfo('這是標清','这里填写视频的高清地址',current)
		}
		if (type === '2') {
			alert('你点击了标清')
			// video.setVideoInfo('這是標清','这里填写视频的超清地址',current)
		}
		video.showLoading(false)

		// setTimeout(function () {
		// 	video.videoEle.currentTime = current
		// 	video.videoPlay()
		// 	video.showLoading(false)
		// }, 3000)
	},
})

在苹果本地跑dvideo会提示操作localStorage不安全的错误,放在服务端就不存在这个问题了

DEMO1  http://www.daiwei.org/components/Dvideo

DEMO2 https://ifmiss.github.io/Dvideo.js/demo/

Keywords

FAQs

Package last updated on 29 Jul 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc