GithubHelp home page GithubHelp logo

chenzhongbin99 / dvideo.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ifmiss/d-video

0.0 0.0 0.0 571 KB

原生的VIdeo插件

Home Page: http:www.daiwei.org/components/Dvideo

Ruby 0.41% CSS 31.22% HTML 25.42% JavaScript 42.95%

dvideo.js's Introduction

Dvideo.js

基于原生js的 video 插件  Dvideo

QQ交流群: 424418160

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

项目运行

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

  npm install
⚠️ 注意: 由于webpack使用的是4.0以上的版本,extract-text-webpack-plugin在安装时需要单独执行  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.js's People

Contributors

ifmiss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.