@mpxjs/api-proxy 2.10.13-beta.2 → 2.10.13-beta.3

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": "@mpxjs/api-proxy",
3
- "version": "2.10.13-beta.2",
3
+ "version": "2.10.13-beta.3",
4
4
  "description": "convert miniprogram API at each end",
5
5
  "module": "src/index.js",
6
6
  "types": "@types/index.d.ts",
@@ -48,9 +48,9 @@ export const createVideoContext = (id, context) => {
48
48
  __videoNode.oRequestFullScreen && __videoNode.oRequestFullScreen() // 欧朋
49
49
  __videoNode.webkitEnterFullscreen && __videoNode.webkitEnterFullscreen() // 苹果
50
50
  if (direction === 0) {
51
- __videoNode.setAttribute('x5-video-orientation', 'portraint') // portraint 竖屏 landscape 横屏
51
+ __videoNode.__vue__._player.setAttribute('x5-video-orientation', 'portraint') // portraint 竖屏 landscape 横屏
52
52
  } else if (direction === 90 || direction === -90) {
53
- __videoNode.setAttribute('x5-video-orientation', 'landscape') // portraint 竖屏 landscape 横屏
53
+ __videoNode.__vue__._player.setAttribute('x5-video-orientation', 'landscape') // portraint 竖屏 landscape 横屏
54
54
  }
55
55
  }
56
56
 
@@ -63,28 +63,29 @@ export const createVideoContext = (id, context) => {
63
63
 
64
64
  // 显示状态栏
65
65
  __videoContext.showStatusBar = () => {
66
- __videoNode.setAttribute('controls', 'controls')
66
+ __videoNode.__vue__._player.setAttribute('controls', 'controls')
67
67
  }
68
68
 
69
69
  // 隐藏状态栏
70
70
  __videoContext.hideStatusBar = () => {
71
- __videoNode.removeAttribute('controls')
71
+ __videoNode.__vue__._player.removeAttribute('controls')
72
72
  }
73
73
 
74
74
  // 暂停
75
75
  __videoContext.pause = () => {
76
- __videoNode.pause()
76
+ // __videoNode.pause()
77
+ __videoNode.__vue__._player.pause()
77
78
  }
78
79
 
79
80
  // 播放
80
81
  __videoContext.play = () => {
81
- __videoNode.play()
82
+ __videoNode.__vue__._player.play()
82
83
  }
83
84
 
84
85
  // 停止视频
85
86
  __videoContext.stop = () => {
86
87
  __videoNode.currentTime = 0
87
- __videoNode.pause()
88
+ __videoNode.__vue__._player.pause()
88
89
  }
89
90
 
90
91
  // 设置倍速播放
@@ -93,12 +94,12 @@ export const createVideoContext = (id, context) => {
93
94
  warn(`不支持${number}倍速播放`)
94
95
  return
95
96
  }
96
- __videoNode.playbackRate = number
97
+ __videoNode.__vue__._player.playbackRate = number
97
98
  }
98
99
 
99
100
  // 跳转到指定位置
100
101
  __videoContext.seek = (number) => {
101
- __videoNode.currentTime = number
102
+ __videoNode.__vue__._player.currentTime = number
102
103
  }
103
104
 
104
105
  return __videoContext