Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eplayer

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eplayer - npm Package Compare versions

Comparing version 1.3.8 to 1.3.9

2

package.json
{
"name": "eplayer",
"version": "1.3.8",
"version": "1.3.9",
"description": "A web-components html5 video player facing future",

@@ -5,0 +5,0 @@ "main": "./packages/eplayer/eplayer.js",

@@ -142,4 +142,3 @@ export class Eplayer extends HTMLElement {

} catch (e) {}
let index = this.video.volume.toFixed(1) * 10
setVolume(index, $('.line'))
setVolume(this.video.volume.toFixed(1) * 10, $('.line'))
break

@@ -150,4 +149,3 @@ case 40:

} catch (e) {}
let index = this.video.volume.toFixed(1) * 10
setVolume(index, $('.line'))
setVolume(this.video.volume.toFixed(1) * 10, $('.line'))
break

@@ -154,0 +152,0 @@ case 32:

@@ -14,2 +14,3 @@ <p align="center"><img src="http://ww1.sinaimg.cn/large/0065Zy9egy1fvcjfzaa1lj30dw0dwwhe.jpg" alt="eplayer logo" width="200px"></p>

### Use
0. ep 基于 web-component,为了兼容,需要事先引入 polyfill

@@ -26,4 +27,7 @@

```
type 属性可选,默认为 mp4,支持 hls 和 flv
2. 注册 `customElement`,注意 `type=module`,使用 es6 的 import
```html

@@ -36,2 +40,3 @@ <script type="module">

```
3. 可选定制 css,用于穿透 shadow-dom 预留的默认样式

@@ -46,3 +51,3 @@

/* 进度条偏移颜色 一般不用设置 */
--buffer: rgba(255, 255, 255, 0.3);
--buffer: rgba(255, 255, 255, 0.6);
/* 图标颜色 一般不用设置 */

@@ -62,5 +67,7 @@ --icons: rgba(255, 255, 255, 0.6);

## Npm
```shell
yarn add eplayer -S
```
同样的注册 customElement,但是注意,customElement 只能注册一次,然后还没完,往下看:

@@ -88,3 +95,3 @@

#### React
#### React / Fre

@@ -95,8 +102,6 @@ react 直接支持 web-components,直接在 render 函数中`e-player`标签

通常为了方便的使用 ref,会封装成 react 组件来使用:
通常为了方便的使用 ref,会封装成组件来使用:
```Javascript
function Eplayer(props) {
return <e-player src={props.src} type={props.type}></e-player>
}
const Eplayer = ({src,type}) => <e-player src={src} type={type}></e-player>
```

@@ -103,0 +108,0 @@

Sorry, the diff of this file is not supported yet

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