lx-video-player 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,13 +4,21 @@
4
4
 
5
5
  ## 使用指南
6
6
 
7
- ### shield内可直接导入组件
7
+ ### shield内可直接导入组件, 按照vue组件使用
8
8
 
9
9
  ```js
10
10
  import VideoPlayer from '@lexiang/video-player';
11
+
12
+ // 支持的事件回调
13
+ const emit = defineEmits<{
14
+ (e: 'ready', player: Player): void // player: tcplayerInstance实例
15
+ (e: 'play'): void
16
+ (e: 'pause'): void
17
+ (e: 'ended'): void
18
+ }>()
11
19
  ```
12
20
 
13
- ### 外部使用npm
21
+ ### 外部使用npm包,按照web components方式使用
14
22
  1.使用命令`npm install lx-video-player`
15
23
  2.`import 'lx-video-player'`
16
24
  3.
@@ -20,18 +28,6 @@ import VideoPlayer from '@lexiang/video-player';
20
28
  * @param selector: 需为播放器指定一个id
21
29
  * @param options: tcplayerSDK的options, 转换为字符串传递(web components属性要字符串传递)
22
30
  */
23
- <lx-video-player selector={selector} options={JSON.stringify(playOptions || '')} @init="onInit"></lx-video-player>
24
- ```
25
-
26
- ```js
27
- // 事件回调
28
- const emit = defineEmits<{
29
- (e: 'init', player: Player): void // player: tcplayerInstance实例
30
- (e: 'play'): void
31
- (e: 'pause'): void
32
- (e: 'ended'): void
33
- (e: 'error'): void
34
- }>()
35
-
31
+ <lx-video-player selector={selector} options={JSON.stringify(playOptions || '')}></lx-video-player>
36
32
  ```
37
33
 
@@ -6,4 +6,3 @@ export {
6
6
  o as c,
7
7
  l as g
8
8
  };
9
- //# sourceMappingURL=_commonjsHelpers-10dfc225.js.map
@@ -1186,4 +1186,3 @@ const Fe = /* @__PURE__ */ be(He), Ve = /* @__PURE__ */ Object.freeze(/* @__PURE
1186
1186
  export {
1187
1187
  Ve as h
1188
1188
  };
1189
- //# sourceMappingURL=hammer-005503be.js.map
@@ -11001,4 +11001,3 @@ const tcplayer_v4_8_0_min = /* @__PURE__ */ getDefaultExportFromCjs(tcplayer_v4_
11001
11001
  export {
11002
11002
  tcplayer_v4_8_0_min$1 as t
11003
11003
  };
11004
- //# sourceMappingURL=tcplayer.v4.8.0.min-31e6d34b.js.map