@dolphinweex/weex-harmony-transform 0.1.15 → 0.1.17

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": "@dolphinweex/weex-harmony-transform",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "weex harmony adapter",
5
5
  "main": "index.js",
6
6
  "files": [
package/src/adapter.js CHANGED
@@ -32,7 +32,15 @@ let webview = {
32
32
  reload: function (webElement) {
33
33
  let params = {"method" : "reload", "name" : webElement.$children[0].embedId};
34
34
  weexModule.callNative(`webview.webHandle`, params, undefined);
35
- }
35
+ },
36
+ postMessage: function (webElement, message) {
37
+ let params = {"method" : "postMessage", "name" : webElement.$children[0].embedId, "message": message};
38
+ weexModule.callNative(`webview.webHandle`, params, undefined);
39
+ },
40
+ notifyWebview: function (webElement, message) {
41
+ let params = {"method" : "notifyWebview", "name" : webElement.$children[0].embedId, "message": message};
42
+ weexModule.callNative(`webview.webHandle`, params, undefined);
43
+ },
36
44
  }
37
45
 
38
46
 
@@ -266,6 +274,64 @@ let bridgeModule = {
266
274
  },
267
275
  }
268
276
 
277
+ let aiSpeechModule = {
278
+ name: 'aiSpeechModule',
279
+ initAISDK: function (param, callback, failCallback) {
280
+ weexModule.callNative('aiSpeechModule.initAISDK', { 'options': param }, callback, undefined, failCallback)
281
+ },
282
+ stopASRSpeech: function (param, callback, failCallback) {
283
+ weexModule.callNative('aiSpeechModule.stopASRSpeech', { 'options': param }, callback, undefined, failCallback)
284
+ },
285
+ startASRSpeech: function (param, callback, failCallback) {
286
+ weexModule.callNative('aiSpeechModule.startASRSpeech', { 'options': param }, callback, undefined, failCallback)
287
+ },
288
+ getNLPWithText: function (param, callback, failCallback) {
289
+ weexModule.callNative('aiSpeechModule.getNLPWithText', { 'options': param }, callback, undefined, failCallback)
290
+ },
291
+ getSpeechDeviceId: function (param, callback, failCallback) {
292
+ weexModule.callNative('aiSpeechModule.getSpeechDeviceId', { 'options': param }, callback, undefined, failCallback)
293
+ },
294
+ startSpeechMonitor: function (param, callback, failCallback) {
295
+ weexModule.callNative('aiSpeechModule.startSpeechMonitor', { 'options': param }, callback, undefined, failCallback)
296
+ },
297
+ resumeSpeechMonitor: function (param, callback, failCallback) {
298
+ weexModule.callNative('aiSpeechModule.resumeSpeechMonitor', { 'options': param }, callback, undefined, failCallback)
299
+ },
300
+ pauseSpeechMonitor: function (param, callback, failCallback) {
301
+ weexModule.callNative('aiSpeechModule.pauseSpeechMonitor', { 'options': param }, callback, undefined, failCallback)
302
+ },
303
+ stopSpeechMonitor: function (param, callback, failCallback) {
304
+ weexModule.callNative('aiSpeechModule.stopSpeechMonitor', { 'options': param }, callback, undefined, failCallback)
305
+ },
306
+ textToSpeech: function (param, callback, failCallback) {
307
+ weexModule.callNative('aiSpeechModule.textToSpeech', { 'options': param }, callback, undefined, failCallback)
308
+ },
309
+ releaseDailog: function (param, callback, failCallback) {
310
+ weexModule.callNative('aiSpeechModule.releaseDailog', { 'options': param }, callback, undefined, failCallback)
311
+ },
312
+ enableWakeup: function (param, callback, failCallback) {
313
+ weexModule.callNative('aiSpeechModule.enableWakeup', { 'options': param }, callback, undefined, failCallback)
314
+ },
315
+ disableWakeup: function (param, callback, failCallback) {
316
+ weexModule.callNative('aiSpeechModule.disableWakeup', { 'options': param }, callback, undefined, failCallback)
317
+ },
318
+ prepareSpeech: function (param, callback, failCallback) {
319
+ weexModule.callNative('aiSpeechModule.prepareSpeech', { 'options': param }, callback, undefined, failCallback)
320
+ },
321
+ startSpeechToText: function (param, callback, failCallback) {
322
+ weexModule.callNative('aiSpeechModule.startSpeechToText', { 'options': param }, callback, undefined, failCallback)
323
+ },
324
+ startTextToSpeech: function (param, callback, failCallback) {
325
+ weexModule.callNative('aiSpeechModule.startTextToSpeech', { 'options': param }, callback, undefined, failCallback)
326
+ },
327
+ stopSpeechToText: function (param, callback, failCallback) {
328
+ weexModule.callNative('aiSpeechModule.stopSpeechToText', { 'options': param }, callback, undefined, failCallback)
329
+ },
330
+ stopTextToSpeech: function (param, callback, failCallback) {
331
+ weexModule.callNative('aiSpeechModule.stopTextToSpeech', { 'options': param }, callback, undefined, failCallback)
332
+ },
333
+ }
334
+
269
335
  let deviceInfo = {
270
336
  name: "weex获取全屏高度",
271
337
  enableFullScreenHeight: function (callback) {
@@ -606,5 +672,6 @@ export {
606
672
  routerModule,
607
673
  nfcModule,
608
674
  router,
675
+ aiSpeechModule,
609
676
  modal
610
677
  }
@@ -15,7 +15,8 @@ const weexExtModules = [
15
15
  'storage',
16
16
  'routerModule',
17
17
  "router",
18
- 'modal'
18
+ 'modal',
19
+ "aiSpeechModule",
19
20
  ]
20
21
 
21
22
  module.exports = weexExtModules