@cc-component/cc-video 1.2.8 → 1.3.0

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.
@@ -49,7 +49,7 @@ export class VideoManager {
49
49
  cur_name = "";
50
50
  get isLoop() {
51
51
  if (this.paramPlay.isLoop === undefined || this.paramPlay.isLoop === null) {
52
- return true
52
+ return false
53
53
  }
54
54
  return this.paramPlay.isLoop
55
55
  }
@@ -130,7 +130,7 @@ export class VideoPlayTT extends BaseVideo {
130
130
  this.videoPlayer.onCanplay(this.onCanplay.bind(this))
131
131
  this.videoPlayer.src = name;
132
132
 
133
- this.videoPlayer.loop = param.isLoop
133
+ this.videoPlayer.loop = param.isLoop === undefined ? false : param.isLoop;
134
134
  const is_skip = name === this.remoteURL;
135
135
  this.remoteURL = name;
136
136
  if (!param.isTargetSize)
@@ -37,6 +37,8 @@ export class VideoPlayWX extends BaseVideo {
37
37
  this.videoPlayer = this.createVideoWX("", true)
38
38
 
39
39
  }
40
+ //文档
41
+ //https://developers.weixin.qq.com/minigame/dev/api/media/video/wx.createVideo.html
40
42
  //创建视频地址(可能要做缓存处理)
41
43
  public createVideoWX(remoteUrl: string, isloop: boolean = false) {
42
44
  const self = this;
@@ -95,7 +97,7 @@ export class VideoPlayWX extends BaseVideo {
95
97
  this.videoPlayer.hide = false;
96
98
  this.videoPlayer.x = 0;
97
99
  this.videoPlayer.src = name;
98
- this.videoPlayer.loop = param.isLoop
100
+ this.videoPlayer.loop = param.isLoop === undefined ? false : param.isLoop;
99
101
  const is_skip = name === this.remoteURL;
100
102
 
101
103
  if (is_skip) {
@@ -143,6 +145,7 @@ export class VideoPlayWX extends BaseVideo {
143
145
  }
144
146
 
145
147
  private videoEnd() {
148
+ //console.error("视频播放完成", this.videoPlayer.loop)
146
149
  // if (!this.isloop) this.node.off(VideoPlayer.EventType.COMPLETED, this.videoEnd, this);
147
150
  this.onVideoEnd?.();
148
151
  }
@@ -81,7 +81,7 @@ export class VideoPlayWeb extends BaseVideo {
81
81
  this.videoPlayer.clip = null
82
82
  this.videoPlayer.clip = clip;
83
83
  //this.videoPlayer.remoteURL = "";
84
- this.videoPlayer.loop = param.isLoop
84
+ this.videoPlayer.loop = param.isLoop === undefined ? false : param.isLoop;
85
85
  const is_skip = name === this.videoName;
86
86
  //console.warn('暂停', is_skip)
87
87
 
@@ -101,7 +101,7 @@ export class VideoPlayWeb extends BaseVideo {
101
101
  this.videoPlayer.remoteURL = ""
102
102
  this.videoPlayer.remoteURL = name;
103
103
  this.videoPlayer.resourceType = VideoPlayer.ResourceType.REMOTE;
104
- this.videoPlayer.loop = param.isLoop
104
+ this.videoPlayer.loop = param.isLoop === undefined ? false : param.isLoop;
105
105
  //console.warn('暂停', is_skip)
106
106
  if (is_skip) {
107
107
  this.isReady = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-video",
3
- "version": "1.2.8",
3
+ "version": "1.3.0",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",