1.0.5 • Published 27 days ago

yyeva v1.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
27 days ago

YY-EVA web 🎁

Language: 中文

📦 Install

npm i yyeva
# or
yarn add yyeva
# or
pnpm add yyeva

💿 Usage

import {yyEva,YYEvaType} from 'yyeva'
let player:YYEvaType = await yyEva({
	container,// Html Element
	videoUrl,// Video Url
	effects: {
	  //  fontStyle doc: https://www.w3schools.com/jsref/canvas_font.asp
          text1: {text: 'text example 1st', fontStyle: '18px arial', fontColor: '#ff0000'},
          text2: {text: 'text example 2nd', fontStyle: '20px arial', fontColor: 'green'},
	},
	// Events
	onStart(){},
	onStop(){},
	onEnd(){},
	onLoopCount(args){},
	onPause(){},
	onResume(){},
	onProcess(){},
	onError(){},
})
player.start() // start player
player.stop() // pause player
player.destroy() // destroy player

configuration

optionseffectdefaultsrequired
videoUrlmp4 address*
hevcUrlmp4 address hevc、h265
looploop or loop counttrue
videoIDAdapt to containers that require prior declaration such as WeChat, otherwise you need to repeatedly click on authorization
mode'AspectFill' / 'AspectFit' / 'contain' / 'cover'scale proportionally according to the parent container
containerdom container*
fpsanimation frameget from video source
usePrefetchwhether to download while playing, the material with "key" is enabled by defaulttrue
useBitmapuse bitmaps instead of img elementstrue
useAccuratein the case of supporting requestVideoFrameCallback, use requestVideoFrameCallback firstfalse
useVideoDBCacheenable indexDB video cachingtrue
useFrameCachenumber of video frame buffers5
useOfsRenderenable multithreaded renderingtrue
mutesilent playback, automatic adjustment according to the environmenttrue
alphaDirectionadjust alpha position for video without keysalphaDirection
renderTyperender mode 'webgl' / 'canvas2d'canvas2d
resizeCanvascanvas size, 'percent', 'percentW', 'percentH', 'size'width 100% height 100%
logLevellog levelinfo
showPlayerInfowhether the console shows the playback status
effectsadditional material content
effects.fontColordefine the font color of the effects material
effects.fontSizedefine the font size of the effects material
checkTimeoutcheck play timeoutfasle
onRequestClickPlaytriggered when the video cannot be played automatically, such as WeChat or "mute=false"type refer to clickPlayBtn

attention

  • make sure logLevel is info to avoid memory leaks in production environments.

compatibility

compatibility list obtained after comprehensive testing detail

WeChat H5

IOS

WeChat ios has been verified and can be played automatically

android

WeChat Android needs to be manually clicked or customized according to the onRequestClickPlay event

Wechat Miniprogram

NPM Package

1.0.5

27 days ago

1.0.4

27 days ago

1.0.3

27 days ago

1.0.2

2 months ago

1.0.1

5 months ago

1.0.0

5 months ago

1.0.0-rc.28

6 months ago

1.0.0-rc.27

6 months ago

1.0.0-rc.26

6 months ago

1.0.0-rc.25

6 months ago

1.0.0-rc.29

6 months ago

1.0.0-rc.31

5 months ago

1.0.0-rc.30

6 months ago

1.0.0-rc.34

5 months ago

1.0.0-rc.33

5 months ago

1.0.0-rc.32

5 months ago

1.0.0-rc.17

10 months ago

1.0.0-rc.16

10 months ago

1.0.0-rc.15

11 months ago

1.0.0-rc.14

12 months ago

1.0.0-rc.19

10 months ago

1.0.0-rc.18

10 months ago

1.0.0-rc.20

10 months ago

1.0.0-rc.24

8 months ago

1.0.0-rc.23

9 months ago

1.0.0-rc.22

9 months ago

1.0.0-rc.21

10 months ago

1.0.0-rc.9

1 year ago

1.0.0-rc.8

1 year ago

1.0.0-rc.5

1 year ago

1.0.0-rc.6

1 year ago

1.0.0-rc.13

1 year ago

1.0.0-rc.12

1 year ago

1.0.0-rc.11

1 year ago

1.0.0-rc.10

1 year ago

1.0.0-rc.3

1 year ago

1.0.0-rc.4

1 year ago

1.0.0-beta.40

1 year ago

1.0.0-ch.1

1 year ago

1.0.0-beta.28

2 years ago

1.0.0-beta.29

2 years ago

1.0.0-beta.33

2 years ago

1.0.0-beta.34

2 years ago

1.0.0-beta.31

2 years ago

1.0.0-beta.32

2 years ago

1.0.0-beta.30

2 years ago

1.0.0-rc.1

1 year ago

1.0.0-beta.39

2 years ago

1.0.0-rc.2

1 year ago

1.0.0-beta.37

2 years ago

1.0.0-beta.38

2 years ago

1.0.0-beta.35

2 years ago

1.0.0-beta.36

2 years ago

1.0.0-beta.22

2 years ago

1.0.0-beta.23

2 years ago

1.0.0-beta.26

2 years ago

1.0.0-beta.27

2 years ago

1.0.0-beta.24

2 years ago

1.0.0-beta.25

2 years ago

1.0.0-beta.11

2 years ago

1.0.0-beta.12

2 years ago

1.0.0-beta.10

2 years ago

1.0.0-beta.8

2 years ago

1.0.0-beta.9

2 years ago

1.0.0-beta.17

2 years ago

1.0.0-beta.18

2 years ago

1.0.0-beta.15

2 years ago

1.0.0-beta.13

2 years ago

1.0.0-beta.14

2 years ago

1.0.0-beta.7

2 years ago

1.0.0-beta.5

2 years ago

1.0.0-beta.4

2 years ago

1.0.0-beta.3

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago