zydx-plus 1.35.550 → 1.35.551

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.35.550",
3
+ "version": "1.35.551",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -732,46 +732,6 @@ let buttonNames = {
732
732
  }
733
733
  }
734
734
  },
735
- resource_lesson023: {
736
- actionName: '经典文章',
737
- buttonList: {
738
- 0: {
739
- headLevel: {
740
- default: "btnIndex1",
741
- btnIndex1: this.getCurrentPrefix(item) + '文章',
742
- btnIndex2: this.getPrefix(item) + '文章'
743
- },
744
- otherLevel: {
745
- default: "btnIndex1",
746
- btnIndex1: this.getCurrentPrefix(item) + '文章',
747
- btnIndex2: this.getPrefix(item) + '文章'
748
- },
749
- lowLevel: {
750
- default: "viewResource",
751
- // createResource: '创建文章',
752
- viewResource: '文章列表',
753
- // selectResource: '查找资源',
754
- }
755
- },
756
- 2: {
757
- headLevel: {
758
- default: "btnIndex1",
759
- btnIndex1: this.getCurrentPrefix(item) + '文章',
760
- btnIndex2: this.getPrefix(item) + '文章'
761
- },
762
- otherLevel: {
763
- default: "btnIndex1",
764
- btnIndex1: this.getCurrentPrefix(item) + '文章',
765
- btnIndex2: this.getPrefix(item) + '文章'
766
- },
767
- lowLevel: {
768
- default: "viewResource",
769
- viewResource: '文章列表',
770
- // selectResource: '查找资源',
771
- }
772
- }
773
- }
774
- },
775
735
  action_lesson056: {
776
736
  actionName: '讲给他人',
777
737
  buttonList: {
@@ -3656,6 +3616,47 @@ let buttonNames = {
3656
3616
  }
3657
3617
  }
3658
3618
  },
3619
+
3620
+ resource_lesson023: {
3621
+ actionName: '经典文章',
3622
+ buttonList: {
3623
+ 0: {
3624
+ headLevel: {
3625
+ default: "btnIndex1",
3626
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3627
+ btnIndex2: this.getPrefix(item) + '文章'
3628
+ },
3629
+ otherLevel: {
3630
+ default: "btnIndex1",
3631
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3632
+ btnIndex2: this.getPrefix(item) + '文章'
3633
+ },
3634
+ lowLevel: {
3635
+ default: "viewResource",
3636
+ // createResource: '创建文章',
3637
+ viewResource: '文章列表',
3638
+ // selectResource: '查找资源',
3639
+ }
3640
+ },
3641
+ 2: {
3642
+ headLevel: {
3643
+ default: "btnIndex1",
3644
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3645
+ btnIndex2: this.getPrefix(item) + '文章'
3646
+ },
3647
+ otherLevel: {
3648
+ default: "btnIndex1",
3649
+ btnIndex1: this.getCurrentPrefix(item) + '文章',
3650
+ btnIndex2: this.getPrefix(item) + '文章'
3651
+ },
3652
+ lowLevel: {
3653
+ default: "viewResource",
3654
+ viewResource: '文章列表',
3655
+ // selectResource: '查找资源',
3656
+ }
3657
+ }
3658
+ }
3659
+ },
3659
3660
  resource_lesson024: {
3660
3661
  actionName: '思想宝库',
3661
3662
  buttonList: {
@@ -11,10 +11,10 @@
11
11
  </div>
12
12
  </div>
13
13
  <div v-if="fileType === 'mp4'" class="mp4">
14
- <video id="video" :src="url" controls></video>
14
+ <video ref="videoRef" id="video" :src="url" controls controlsList='nodownload noremote footbar'></video>
15
15
  </div>
16
16
  <div v-if="fileType === 'mp3'" class="mp3">
17
- <audio :src="url" controls></audio>
17
+ <audio ref="audioRef" id="audio" :src="url" controls controlsList='nodownload noremote footbar'></audio>
18
18
  </div>
19
19
  <div v-if="loading" class="loading-back">
20
20
  <div class="loading-cont">
@@ -40,6 +40,10 @@ import '@vue-office/excel/lib/index.css'
40
40
  import Mess from '../../tipBox/index'
41
41
  import {debounce} from "../../utils";
42
42
 
43
+ import VideoJS from 'video.js';
44
+ import 'videojs-contrib-hls';
45
+ import 'video.js/dist/video-js.css';
46
+
43
47
  let pdfs = {}
44
48
  export default {
45
49
  name: "zydx-read",
@@ -65,6 +69,7 @@ export default {
65
69
  resizeObserver: {},
66
70
  loadingTask: {},
67
71
  // pdfs:null
72
+ player:null
68
73
  }
69
74
  },
70
75
  props: {
@@ -148,6 +153,31 @@ export default {
148
153
  this.resizeObserver[`${this.refSrc}`].observe(el);
149
154
  }, 300)
150
155
  }
156
+ if(this.fileType === 'mp4'){
157
+ this.$nextTick(() => {
158
+ if (this.$refs.videoRef) {
159
+ this.player = VideoJS('video');
160
+ this.$refs.videoRef.addEventListener('play', () => {
161
+ this.$emit('playingEvent')
162
+ });
163
+ this.$refs.videoRef.addEventListener('pause', () => {
164
+ this.$emit('pausedEvent')
165
+ });
166
+ }
167
+ })
168
+ }
169
+ if(this.fileType === 'mp3') {
170
+ this.$nextTick(()=>{
171
+ if (this.$refs.audioRef) {
172
+ this.$refs.audioRef.addEventListener('play', () => {
173
+ this.$emit('playingEvent')
174
+ });
175
+ this.$refs.audioRef.addEventListener('pause', () => {
176
+ this.$emit('pausedEvent')
177
+ });
178
+ }
179
+ })
180
+ }
151
181
  setTimeout(() => {
152
182
  this.repeat = false
153
183
  }, 1000)
@@ -161,6 +191,34 @@ export default {
161
191
  console.log(video);
162
192
  });
163
193
  },
194
+ readPlay(){
195
+ if(this.fileType === 'mp4'){
196
+ this.$nextTick(() => {
197
+ this.player.play()
198
+ })
199
+ }
200
+ if(this.fileType === 'mp3') {
201
+ this.$nextTick(()=>{
202
+ if (this.$refs.audioRef) {
203
+ this.$refs.audioRef.play();
204
+ }
205
+ })
206
+ }
207
+ },
208
+ readPause(){
209
+ if(this.fileType === 'mp4'){
210
+ this.$nextTick(() => {
211
+ this.player.pause()
212
+ })
213
+ }
214
+ if(this.fileType === 'mp3') {
215
+ this.$nextTick(()=>{
216
+ if (this.$refs.audioRef) {
217
+ this.$refs.audioRef.pause();
218
+ }
219
+ })
220
+ }
221
+ },
164
222
  init() {
165
223
  let that = this
166
224
  this.canvasArr[`${this.refSrc}`] = []
@@ -193,10 +193,10 @@ export default {
193
193
  },
194
194
  //
195
195
  editorCreateShape(myShape){
196
- editorAPP.createShape(myShape)
196
+ editorAPP?.createShape(myShape)
197
197
  },
198
198
  editorDeleteShape(shapeId){
199
- editorAPP.deleteShape(shapeId)
199
+ editorAPP?.deleteShape(shapeId)
200
200
  },
201
201
  // 添加快照
202
202
  setSnapshot(v) {
@@ -142,6 +142,7 @@ export default {
142
142
  background-position: center;
143
143
  border-right: 2px solid #dcdfe6;
144
144
  border-left: 2px solid #dcdfe6;
145
+ z-index: 999;
145
146
  }
146
147
  .resize:hover {
147
148
  background-color: white;
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.550',
92
+ version: '1.35.551',
93
93
  install,
94
94
  Calendar,
95
95
  Message,