1.0.0 • Published 5 years ago

barrage-h5 v1.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

barrage-h5

基于 canvas 的弹幕 js方法。 并且结合 html 和 node 实战例子,实战内容见 example(html) 和 server(node)。

Usage

  const barrageH5 = import('barrage-h5')

  barrageH5(video, canvas, options)

options

参数名称类型含义是否必填默认值
dataArray已有弹窗数据[]
defaultStyleObject弹窗的配置default
default = {
  value: ''
  time: context.video.currentTime,
  color: 'red',
  speed: 1,
  fontSize: 20
}

example

详细例子见 exampleserver 文件夹

example 是页面内容, server 是服务器内容

1.0.0

5 years ago

1.0.0-1

5 years ago