@shijiu/jsview-vue 2.1.448-test.0 → 2.1.482-test.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.
Files changed (69) hide show
  1. package/bin/browser/BrowserApic.vue.mjs +4 -4
  2. package/bin/browser/BrowserApic2.vue.mjs +4 -4
  3. package/bin/browser/BrowserApicLib.mjs +24 -24
  4. package/bin/browser/BrowserAudio.vue.mjs +8 -8
  5. package/bin/browser/BrowserJsvLatex.vue.mjs +27 -15
  6. package/bin/browser/BrowserPreload.vue.mjs +4 -4
  7. package/bin/browser/BrowserQrcode.vue.mjs +4 -4
  8. package/bin/browser/BrowserSpray.vue.mjs +4 -4
  9. package/bin/browser/BrowserTextureAnim.vue.mjs +4 -4
  10. package/bin/export-sfc.mjs +3 -3
  11. package/bin/jsview-vue-common.mjs +3 -3
  12. package/bin/jsview-vue.mjs +12138 -13910
  13. package/bin/types/browser/BrowserApic.vue.d.mts +33 -0
  14. package/bin/types/browser/BrowserApic2.vue.d.mts +16 -0
  15. package/bin/types/browser/BrowserApicLib.d.mts +56 -0
  16. package/bin/types/browser/BrowserAudio.vue.d.mts +2 -0
  17. package/bin/types/browser/BrowserJsvLatex.vue.d.mts +55 -0
  18. package/bin/types/browser/BrowserPreload.vue.d.mts +14 -0
  19. package/bin/types/browser/BrowserQrcode.vue.d.mts +29 -0
  20. package/bin/types/browser/BrowserSpray.vue.d.mts +2 -0
  21. package/bin/types/browser/BrowserTextureAnim.vue.d.mts +2 -0
  22. package/bin/types/export-sfc.d.mts +2 -0
  23. package/bin/types/jsview-vue-common.d.mts +23 -0
  24. package/bin/types/jsview-vue.d.mts +2511 -0
  25. package/index.d.ts +3 -4
  26. package/package.json +1 -1
  27. package/tools/config/tsconfig.json +7 -10
  28. package/tools/jsview-vue-build.mjs +25 -4
  29. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +2 -1
  30. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +2 -1
  31. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +94 -38
  32. package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +1 -1
  33. package/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue +0 -1
  34. package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +11 -3
  35. package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +6 -3
  36. package/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue +20 -0
  37. package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +13 -3
  38. package/utils/JsViewPlugin/JsvAudio/index.js +11 -16
  39. package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +22 -5
  40. package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +3 -1
  41. package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +20 -0
  42. package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +13 -3
  43. package/utils/JsViewPlugin/JsvLatex/index.js +11 -16
  44. package/utils/JsViewPlugin/index.js +1 -1
  45. package/utils/JsViewVueTools/ForgeHandles.ts +14 -0
  46. package/utils/JsViewVueTools/{JsvDynamicKeyFrames.js → JsvDynamicKeyFrames.ts} +2 -2
  47. package/utils/JsViewVueTools/JsvFederationTools.ts +35 -0
  48. package/utils/JsViewVueTools/JsvPreDownloader.ts +36 -37
  49. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +1 -1
  50. package/utils/JsViewVueTools/index.js +2 -1
  51. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +7 -3
  52. package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +4 -2
  53. package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +4 -0
  54. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +18 -0
  55. package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +1 -1
  56. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
  57. package/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.ts +11 -7
  58. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +135 -61
  59. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.ts +26 -0
  60. package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +8 -1
  61. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +6 -0
  62. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +1 -1
  63. package/bin/browser/BrowserJsvPlayer.vue.mjs +0 -573
  64. package/utils/JsViewEngineWidget/index.d.ts +0 -28
  65. package/utils/JsViewPlugin/JsvLatex/mathjax-tex-svg.txt +0 -1
  66. package/utils/JsViewPlugin/index.d.ts +0 -1
  67. package/utils/JsViewVueTools/ForgeHandles.js +0 -13
  68. package/utils/JsViewVueTools/index.d.ts +0 -13
  69. /package/utils/JsViewVueWidget/JsvSpriteAnim/{sAnimationToken.js → sAnimationToken.ts} +0 -0
@@ -1,573 +0,0 @@
1
- import { Forge } from '@shijiu/jsview/dom/jsv-forge-define';
2
- import { shallowRef, openBlock, createElementBlock, normalizeStyle, createElementVNode } from 'vue';
3
- import { _ as _export_sfc } from '../export-sfc.mjs';
4
-
5
- //!
6
- //! utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js;
7
- //!
8
- let methods = {
9
- /**
10
- * 要求终端访问指定的频道,并立即返回。对由本地设置为跳过的频道,也返回-1。
11
- * 频道地址为通过 CTCSetConfig 设置的频道列表中的地址:
12
- * 如频道地址为 igmp://的组播地址,则加入组播频道,播放器开始播放组播频道,并处理相应的时移等功能;
13
- * 如频道地址为 rtsp://的单播地址,则连接单播频道,播放器开始播放;
14
- * 如频道地址为 http://的地址,则浏览器直接发起请求,访问该页面。
15
- * 【注】:在加入一个频道之前已经加入另外一个频道,需先调用 leaveChannel 方法离开前一个频道。
16
- * @param {int} channelID 用户频道号。
17
- * @returns {int} 0,表示成功;-1:表示频道号无效。
18
- */
19
- joinChannel(channelID) {
20
- console.log(`PC simulate browser player joinChannel(${channelID})`);
21
- },
22
- /**
23
- * 要求终端离开指定的频道,并立即返回。
24
- * 如原频道地址为 igmp://的组播地址,则立即离开组播频道,播放器停止播放组播频道,并断开相应的时移连接;
25
- * 如频道地址为 rtsp://的单播地址,则断开单播频道,播放器停止播放;
26
- * 如频道地址为 http://的地址,则浏览器不作操作。
27
- * 【注】:本方法只用于离开通过 joinChannel 方法加入的频道。
28
- * @returns {int} 0,表示成功;-1:表示频道号无效。
29
- */
30
- leaveChannel() {
31
- console.log(`PC simulate browser player leaveChannel()`);
32
- return 0;
33
- },
34
- // /**
35
- // * 快进。
36
- // * @param {float} speed 2至32
37
- // */
38
- // fastForward(value) {
39
- // console.log(`browser player fastForward(${value})`);
40
- // },
41
- // /**
42
- // * 快退。
43
- // * @param {float} speed -2至-32
44
- // */
45
- // fastRewind(value) {
46
- // console.log(`browser player fastRewind(${value})`);
47
- // },
48
- /**
49
- * 获取系统音量。
50
- * @param {int} max_volume 音量范围,即可设置的最大音量值,一般有16和100两种值。
51
- * @return {int} 当前音量,根据max_volume进行了换算。
52
- * */
53
- getGlobalVolume(max_volume) {
54
- console.log(`PC simulate browser player getGlobalVolume(${max_volume})`);
55
- return 0;
56
- },
57
- /**
58
- * 设置系统音量。
59
- * @param {int} volume 0-max_volume,音量值。
60
- * @param {int} flags 1表示显示音量调节UI;4表示使用提示音。两个值可以是或的关系。
61
- * @param {int} max_volume 音量范围,即可设置的最大音量值,一般有16和100两种值。
62
- * */
63
- setGlobalVolume(volume, flags, max_volume) {
64
- console.log(`PC simulate browser player setGlobalVolume(${volume}, ${flags}, ${max_volume})`);
65
- },
66
- /**
67
- * 调整系统音量,一次设置一个步长。
68
- * @param {int} direction 1增大音量;-1减小音量。
69
- * @param {int} flags FLAG_SHOW_UI(1)表示显示音量调节UI;FLAG_PLAY_SOUND(4)表示使用提示音。两个值可以是或的关系。
70
- * */
71
- adjustGlobalVolume(direction, flags) {
72
- console.log(`PC simulate browser player adjustGlobalVolume(${direction}, ${flags})`);
73
- },
74
- /**
75
- * 回到视频的开头。
76
- */
77
- gotoStart() {
78
- console.log(`PC simulate browser player gotoStart()`);
79
- },
80
- /**
81
- * 到达视频的末尾。
82
- */
83
- gotoEnd() {
84
- console.log(`PC simulate browser player gotoEnd()`);
85
- },
86
- /**
87
- * 设置播放地址。
88
- * @param {string} url 播放地址。
89
- * @param {string} head 网络请求的head信息,可以为NULL。
90
- * @param {int} type 类型,1表示点播,2表示直播,3表示时移,默认1。
91
- */
92
- setSrc(url, head, type) {
93
- console.log(`PC simulate setSrc url=${url} head=${head} type=${type}`);
94
- this.src = url;
95
- }
96
- };
97
-
98
- //!
99
- //! utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue;
100
- //!
101
- /*!
102
-
103
-
104
-
105
-
106
- */
107
- let logDebug = console.log;
108
- const _sfc_main = {
109
- props: {
110
- /**
111
- * 回调函数,播放器对象通知接口
112
- * @param {Object} video对象,可以通过此video对象调用video相关属性和方法,具体属性和方法定义见JsvMedia.js文件里相关说明。
113
- */
114
- onRef: { type: Function, default: () => {
115
- } },
116
- /**
117
- * 属性,Boolean类型,true表示自动播放,默认false。
118
- */
119
- autoplay: { type: Boolean, default: false },
120
- /**
121
- * 属性,String类型,播放器实例索引,同样的key使用同一个播放器实例。
122
- */
123
- playerKey: { type: String, default: null },
124
- /**
125
- * 属性,String类型,播放器窗口模式,默认resizable模式。
126
- * full:观影模式,全屏方式,不建议修改w/h/l/t,视频清晰度/流畅度最佳;
127
- * resizable:可变窗口模式,可以随意修改w/h/l/t,支持动画效果,视频清晰度/流畅度表现可能不如full模式;
128
- * pip:画中画模式,只在支持多路硬解的情况下使用,用户画中画的小窗播放,对清晰度/流畅度要求较差,可能会有反交错问题。
129
- */
130
- windowMode: { type: String, default: "resizable" },
131
- /**
132
- * 属性,int类型,底层使用的播放器类型。1:系统播放器;2:jsv播放器。默认2。
133
- */
134
- playerType: { type: Number, default: 2 },
135
- /**
136
- * 属性,int类型,播放器解码方式。0:根据硬件能力自动匹配;1:硬解码;2:软解码。默认0(根据芯片能力自动匹配)。
137
- */
138
- decodeType: { type: Number, default: 0 },
139
- /**
140
- * 属性,Boolean类型,层级关系,true表示在界面的下面,false表示在界面上面,默认true。
141
- */
142
- background: { type: Boolean, default: true },
143
- /**
144
- * 属性,Boolean类型,true表示静音,默认false。
145
- */
146
- muted: { type: Boolean, default: false },
147
- /**
148
- * 属性,Boolean类型,true表示循环播放,默认false。
149
- */
150
- loop: { type: Boolean, default: false },
151
- /**
152
- * 属性,String类型,播放地址。
153
- */
154
- src: { type: String, default: "" },
155
- /**
156
- * 属性,Double类型,起播时间,0-duration。
157
- */
158
- currentTime: { type: Number, default: 0 },
159
- /**
160
- * 属性,Boolean类型,是否保留最后一帧,true保留,false不保留。
161
- */
162
- keepLastFrame: { type: Boolean, default: true },
163
- /**
164
- * 属性,String类型,视频显示比例,origin原始比例显示,full全屏显示,x:y按照指定比例显示。
165
- */
166
- videoAspectRatio: { type: String, default: "origin" },
167
- /**
168
- * 属性,JSON Object类型,色度抠像参数,包含color,colorDistance,edgeDistance,greenOffset四个参数,
169
- * 参考格式:{color: 0x30FF30, colorDistance: 0.15, edgeDistance: 0.4, greenOffset: 0.05}
170
- * color,色值,int类型,为抠图色值范围的中心点,格式为0xRRGGBB。
171
- * colorDistance,float类型,色域范围,范围0-1.0。
172
- * edgeDistance,float类型,alpha透明度距离,范围colorDistance-1.0,从colorDistance到edgeDistance的alpha值从1.0-0线性递减。
173
- * greenOffset,float类型,红蓝差值,范围0-1.0。
174
- * 目前只支持扣绿。
175
- */
176
- chromaKey: { type: Object, default: null },
177
- /**
178
- * 回调函数,播放结束时通过此回调接口通知。
179
- */
180
- onEnded: {
181
- type: Function,
182
- default: () => {
183
- return {};
184
- }
185
- },
186
- /**
187
- * 回调函数,播放错误时通过此接口通知。
188
- * @param {int} 错误类型,当前定义了四种错误。1是异常中断;2是网络错误;3是解码错误;4是格式不支持。
189
- */
190
- onError: {
191
- type: Function,
192
- default: () => {
193
- return {};
194
- }
195
- },
196
- // onAbort: {type: Function, default: ()=>{return{}}},
197
- /**
198
- * 回调函数,当正常播放时,每0.5秒上报一次,回调接口里会带上当前时间,也可以使用video对象的currentTime属性去获取当前时间。
199
- * @param {Long} 当前播放时间,单位秒。
200
- */
201
- onTimeUpdate: {
202
- type: Function,
203
- default: () => {
204
- return {};
205
- }
206
- },
207
- /**
208
- * 回调函数,开始加载,设置完播放地址后,上报此事件。
209
- */
210
- onLoadStart: {
211
- type: Function,
212
- default: () => {
213
- return {};
214
- }
215
- },
216
- /**
217
- * 回调函数,开始正常播放,同一个播放地址仅触发一次。
218
- */
219
- onCanPlayThrough: {
220
- type: Function,
221
- default: () => {
222
- return {};
223
- }
224
- },
225
- /**
226
- * 回调函数,正常下载,duration不变的情况下只触发一次。
227
- */
228
- onProgress: {
229
- type: Function,
230
- default: () => {
231
- return {};
232
- }
233
- },
234
- /**
235
- * 回调函数,视频准备好后触发。
236
- */
237
- onLoadedMetaData: {
238
- type: Function,
239
- default: () => {
240
- return {};
241
- }
242
- },
243
- /**
244
- * 回调函数,视频准备好后触发,这个时候可以正常seek。
245
- */
246
- onLoad: {
247
- type: Function,
248
- default: () => {
249
- return {};
250
- }
251
- },
252
- /**
253
- * 回调函数,视频准备好后触发,这个时候可以获取duration。
254
- */
255
- onDurationChange: {
256
- type: Function,
257
- default: () => {
258
- return {};
259
- }
260
- },
261
- /**
262
- * 回调函数,视频准备好后,seek(修改currentTime)会出发此事件。
263
- */
264
- onSeeking: {
265
- type: Function,
266
- default: () => {
267
- return {};
268
- }
269
- },
270
- /**
271
- * 回调函数,seek完成后触发此事件。
272
- */
273
- onSeeked: {
274
- type: Function,
275
- default: () => {
276
- return {};
277
- }
278
- },
279
- /**
280
- * 回调函数,缓冲时触发。
281
- */
282
- onStalled: {
283
- type: Function,
284
- default: () => {
285
- return {};
286
- }
287
- },
288
- /**
289
- * 回调函数,正常播放后触发。
290
- */
291
- onPlaying: {
292
- type: Function,
293
- default: () => {
294
- return {};
295
- }
296
- },
297
- /**
298
- * 回调函数,正常显示后触发此事件。
299
- */
300
- onCanPlay: {
301
- type: Function,
302
- default: () => {
303
- return {};
304
- }
305
- },
306
- /**
307
- * 回调函数,音频失去焦点后触发此事件,可能会导致pause(点播)或者离开频道(直播)。
308
- */
309
- onAudioFocusLoss: {
310
- type: Function,
311
- default: () => {
312
- return {};
313
- }
314
- },
315
- /**
316
- * 回调函数,音频获取焦点后触发此事件,可能会触发resume(点播)或者加入频道(直播)。
317
- */
318
- onAudioFocusGain: {
319
- type: Function,
320
- default: () => {
321
- return {};
322
- }
323
- },
324
- /**
325
- * 回调函数,直播进入时移状态时,触发此事件。
326
- */
327
- onTimeShift: {
328
- type: Function,
329
- default: () => {
330
- return {};
331
- }
332
- },
333
- /**
334
- * 回调函数,直播进入时移状态时,成功播放触发此事件。
335
- */
336
- onTimeShifted: {
337
- type: Function,
338
- default: () => {
339
- return {};
340
- }
341
- },
342
- /**
343
- * 回调函数,时移回到直播状态,触发此事件。
344
- */
345
- onBackLive: {
346
- type: Function,
347
- default: () => {
348
- return {};
349
- }
350
- },
351
- /**
352
- * 回调函数,时移回到直播状态时,成功播放触发此事件。
353
- */
354
- onBackLived: {
355
- type: Function,
356
- default: () => {
357
- return {};
358
- }
359
- },
360
- /**
361
- * 属性,Object类型,设置窗口属性,同其他组件的style设置。
362
- */
363
- style: {
364
- type: Object,
365
- default: () => {
366
- return {};
367
- }
368
- },
369
- /**
370
- * 属性,Boolean类型,活跃状态,当多个JsvPlayer组件指向一个video对象时,只能有一个处于活跃状态。
371
- * 视频显示在活跃JsvPlayer设置的显示区域内,事件通知也只会送给活跃的JsvPlayer组件注册的回调函数。
372
- */
373
- active: { type: Boolean, default: true }
374
- },
375
- components: {},
376
- watch: {
377
- active(newValue) {
378
- console.log("LudlDebug active newValue: " + newValue);
379
- if (this.video) {
380
- if (newValue) {
381
- this.registerEvent();
382
- this.video.setHoleID(this.holeId);
383
- this.holeStyle = {
384
- left: 0,
385
- top: 0,
386
- width: this.style.width,
387
- height: this.style.height
388
- };
389
- } else {
390
- this.holeStyle = {
391
- left: 0,
392
- top: 0,
393
- width: 0,
394
- height: 0
395
- };
396
- }
397
- }
398
- },
399
- style(newValue) {
400
- logDebug(
401
- "holeStyle newValue: left=" + newValue.left + ", top=" + newValue.top + ", width=" + newValue.width + ", height=" + newValue.height
402
- );
403
- if (this.active) {
404
- this.holeStyle = {
405
- left: 0,
406
- top: 0,
407
- width: newValue.width,
408
- height: newValue.height
409
- };
410
- }
411
- },
412
- keepLastFrame(newValue) {
413
- logDebug("keepLastFrame newValue: " + newValue);
414
- if (this.video && this.active) {
415
- this.video.keepLastFrame = this.keepLastFrame;
416
- }
417
- }
418
- },
419
- setup() {
420
- return {
421
- video: null,
422
- holeId: "",
423
- jsvMainView: shallowRef(null),
424
- innerViewId: shallowRef(-1)
425
- };
426
- },
427
- data() {
428
- return {
429
- holeStyle: {}
430
- };
431
- },
432
- created() {
433
- },
434
- mounted() {
435
- logDebug("JsvPlayer:", this.style);
436
- let key = "Jsv_" + Math.floor(Math.random() * 1e4);
437
- if (this.playerKey) {
438
- key = this.playerKey;
439
- }
440
- logDebug("player key:" + key);
441
- let player_type = 1;
442
- if (this.playerType)
443
- player_type = this.playerType;
444
- let background = true;
445
- if (!this.background)
446
- background = this.background;
447
- logDebug("JsvPlayer background:" + background);
448
- const designMap = window.Forge.DesignMap();
449
- logDebug("JsvPlayer:", this.holeId);
450
- let first_create = true;
451
- if (!this.video) {
452
- this.video = window.originDocument.createElement("video");
453
- this._extendsApi(this.video);
454
- } else {
455
- this.video.setRef();
456
- first_create = false;
457
- }
458
- if (this.video != null) {
459
- if (this.active) {
460
- this.registerEvent();
461
- if (this.src && this.src !== "")
462
- this.video.src = this.src;
463
- if (this.currentTime !== 0)
464
- this.video.currentTime = this.currentTime;
465
- if (this.autoplay) {
466
- this.video.autoplay = this.autoplay;
467
- }
468
- if (this.muted) {
469
- this.video.muted = this.muted;
470
- }
471
- if (this.loop) {
472
- this.video.loop = this.loop;
473
- }
474
- if (!this.keepLastFrame) {
475
- this.video.keepLastFrame = this.keepLastFrame;
476
- }
477
- if (this.videoAspectRatio !== "origin") {
478
- this.video.videoAspectRatio = this.videoAspectRatio;
479
- }
480
- if (this.chromaKey && this.chromaKey !== "") {
481
- this.video.setChromaKey(this.chromaKey);
482
- }
483
- if (!first_create) {
484
- this.video.setHoleID(this.holeId);
485
- this.holeStyle = {
486
- left: 0,
487
- top: 0,
488
- width: this.style.width,
489
- height: this.style.height
490
- };
491
- }
492
- }
493
- this.jsvMainView = new Forge.VideoView(this.video, null);
494
- this.innerViewId = Forge.sViewStore.add(
495
- new Forge.ViewInfo(this.jsvMainView)
496
- );
497
- this.onRef?.(this.video);
498
- }
499
- },
500
- unmounted() {
501
- if (this.video != null) {
502
- if (this.innerViewId !== -1) {
503
- Forge.sViewStore.remove(this.innerViewId);
504
- this.innerViewId = -1;
505
- this.jsvMainView = null;
506
- }
507
- this.onRef?.(null);
508
- }
509
- },
510
- methods: {
511
- getHoleId(id) {
512
- logDebug("getHoleId:", id);
513
- this.holeId = id;
514
- },
515
- registerEvent() {
516
- if (this.video && this.active) {
517
- this.video.addEventListener("end", this.onEnded);
518
- this.video.addEventListener("error", this.onError);
519
- this.video.addEventListener("timeupdate", this.onTimeUpdate);
520
- this.video.addEventListener("loadstart", () => {
521
- logDebug("JsvPlayer received loadstart event.");
522
- this.holeStyle = {
523
- left: 0,
524
- top: 0,
525
- width: this.style.width,
526
- height: this.style.height
527
- };
528
- this.onLoadStart();
529
- });
530
- this.video.addEventListener("canplaythrough", this.onCanPlayThrough);
531
- this.video.addEventListener("progress", this.onProgress);
532
- this.video.addEventListener("loadedmetadata", this.onLoadedMetaData);
533
- this.video.addEventListener("load", this.onLoad);
534
- this.video.addEventListener("durationchange", this.onDurationChange);
535
- this.video.addEventListener("seeking", this.onSeeking);
536
- this.video.addEventListener("seeked", this.onSeeked);
537
- this.video.addEventListener("stalled", this.onStalled);
538
- this.video.addEventListener("playing", this.onPlaying);
539
- this.video.addEventListener("canplay", this.onCanPlay);
540
- this.video.addEventListener("audiofocusloss", this.onAudioFocusLoss);
541
- this.video.addEventListener("audiofocusgain", this.onAudioFocusGain);
542
- this.video.addEventListener("timeshift", this.onTimeShift);
543
- this.video.addEventListener("timeshifted", this.onTimeShifted);
544
- this.video.addEventListener("backlive", this.onBackLive);
545
- this.video.addEventListener("backlived", this.onBackLived);
546
- }
547
- },
548
- _extendsApi(videoRef) {
549
- for (let method_name in methods) {
550
- videoRef[method_name] = methods[method_name].bind(videoRef);
551
- }
552
- }
553
- }
554
- };
555
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
556
- return openBlock(), createElementBlock("div", {
557
- style: normalizeStyle($data.holeStyle),
558
- backgroundColor: "rgba(0,0,0,1)"
559
- }, [
560
- createElementVNode("div", {
561
- style: normalizeStyle({
562
- left: $data.holeStyle.left,
563
- top: $data.holeStyle.top,
564
- width: $data.holeStyle.width,
565
- height: $data.holeStyle.height
566
- }),
567
- "data-jsv-vw-innerview": $setup.innerViewId
568
- }, null, 12, ["data-jsv-vw-innerview"])
569
- ], 4);
570
- }
571
- const BrowserJsvPlayer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
572
-
573
- export { BrowserJsvPlayer as default };
@@ -1,28 +0,0 @@
1
- // 添加jsvCreateFocusManager的声明
2
- export declare function jsvCreateFocusManager(): Plugin_2;
3
-
4
- // 添加JsvFocusManager的声明
5
- export declare interface JsvFocusManager {
6
- // declareAlias(alias: String, block?: String): Void;
7
- // changeFocusTo(nameOrSpace: String, name?: String, exact?: Boolean): Void
8
- }
9
-
10
- declare module '@vue/runtime-core' {
11
- export interface ComponentCustomProperties {
12
- $jsvFocusManager: JsvFocusManager
13
- }
14
- }
15
-
16
- // 添加JsvFocusBlock的声明
17
- export declare interface JsvFocusBlock {
18
- getFullName(): String;
19
- requestFocus(): Void
20
- }
21
-
22
- // 添加JsvFocusEvent的声明
23
- export declare interface JsvFocusEvent {
24
- ownerNode: JsvFocusBlock;
25
- type: string;
26
- keyCode: number;
27
- key: string;
28
- }