hh-doctor-sdk 0.1.4 → 0.1.6

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.
@@ -19,6 +19,8 @@ const commands = {
19
19
  INTERRUPT: "interrupt",
20
20
  SWITCH_TO_AUDIO: "SWITCH_TO_AUDIO",
21
21
  SWITCH_TO_VIDEO: "SWITCH_TO_VIDEO",
22
+ SWITCH_TO_VIDEO_SYNC: "SWITCH_TO_VIDEO_SYNC",
23
+ SWITCH_TO_AUDIO_SYNC: "SWITCH_TO_AUDIO_SYNC",
22
24
  SWITCH_TO_VIDEO_WMP: "SWITCH_TO_VIDEO_SYNC_wmp",
23
25
  SWITCH_TO_AUDIO_WMP: "SWITCH_TO_AUDIO_SYNC_wmp",
24
26
  SWITCH_TO_AUDIO_SYNC_agora: "SWITCH_TO_AUDIO_SYNC_agora",
@@ -48,11 +50,25 @@ function sendReject() {
48
50
  }
49
51
 
50
52
  function sendSwitch2Audio(fromAgroa) {
51
- return _sendMessage(fromAgroa ? commands.SWITCH_TO_AUDIO_SYNC_agora : commands.SWITCH_TO_AUDIO_WMP)
53
+ if (fromAgroa) {
54
+ _sendMessage(commands.SWITCH_TO_AUDIO_SYNC_agora)
55
+ } else {
56
+ _sendMessage(commands.SWITCH_TO_AUDIO)
57
+ _sendMessage(commands.SWITCH_TO_AUDIO_SYNC)
58
+ _sendMessage(commands.SWITCH_TO_AUDIO_WMP)
59
+ }
60
+
52
61
  }
53
62
 
54
63
  function sendSwitch2Video(fromAgroa) {
55
- return _sendMessage(fromAgroa ? commands.SWITCH_TO_VIDEO_SYNC_agora : commands.SWITCH_TO_VIDEO_WMP)
64
+ if (fromAgroa) {
65
+ _sendMessage(commands.SWITCH_TO_VIDEO_SYNC_agora)
66
+ } else {
67
+ _sendMessage(commands.SWITCH_TO_VIDEO)
68
+ _sendMessage(commands.SWITCH_TO_VIDEO_SYNC)
69
+ _sendMessage(commands.SWITCH_TO_VIDEO_WMP)
70
+ }
71
+
56
72
  }
57
73
 
58
74
  function _sendMessage(command) {
@@ -29,6 +29,7 @@ module.exports = Behavior({
29
29
  wx.statLog.sendStatLog(null, '获取订单详情数据完成')
30
30
  // wx.hideLoading()
31
31
  const order = res.data.order
32
+ // console.error(`order info ==> ${JSON.stringify(order)}`)
32
33
  const feedbackStar = res.data.feedbackStar
33
34
  let notifySetVideoTime = false
34
35
  if (order && order.orderService && order.orderService.provideType === 'video') {
@@ -293,9 +293,15 @@ Component({
293
293
  },
294
294
  switchAudioVideo(toAudio) {
295
295
  if (toAudio) {
296
- this.TRTC.getPusherInstance().pause()
296
+ // this.TRTC.getPusherInstance().pause()
297
+ this.setPusherAttributesHandler({
298
+ enableCamera: false,
299
+ })
297
300
  } else {
298
- this.TRTC.getPusherInstance().resume()
301
+ // this.TRTC.getPusherInstance().resume()
302
+ this.setPusherAttributesHandler({
303
+ enableCamera: true,
304
+ })
299
305
  }
300
306
  },
301
307
  switchCamera() {
@@ -298,7 +298,7 @@ module.exports = Behavior({
298
298
  wx.statLog.sendStatLog(null, '发送呼叫消息')
299
299
  return new Promise((resolve, reject) => {
300
300
  message_api.bindData({
301
- 'toUUID': this.data.isFamilyOrder ? this.data.order.patient.patientUuid : this.data.order.doctorUuid,
301
+ 'toUUID': this.data.order.doctorUuid, //this.data.isFamilyOrder ? this.data.order.patient.patientUuid : this.data.order.doctorUuid,
302
302
  'orderId': this.data.orderId
303
303
  })
304
304
  message_api.sendCall().then((res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-doctor-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "和缓名医小程序SDK",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"