@tencentcloud/trtc-component-wx 0.0.17 → 0.0.20
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.
|
@@ -140,7 +140,7 @@ Component({
|
|
|
140
140
|
InterfaceEventEmitter.on('pusherAttributesChange', this.pusherAttributesChange, this);
|
|
141
141
|
},
|
|
142
142
|
unbindTRTCCloudEvent: function unbindTRTCCloudEvent() {
|
|
143
|
-
InterfaceEventEmitter.off('
|
|
143
|
+
InterfaceEventEmitter.off('pusherAttributesChange', this.pusherAttributesChange);
|
|
144
144
|
},
|
|
145
145
|
|
|
146
146
|
// 请保持跟 wxml 中绑定的事件名称一致
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@tencentcloud/trtc-cloud-wx\"","webpack:///./src/trtc-pusher.js"],"names":["trtcCloud","TRTCCloud","getTRTCShareInstance","trtc","InterfaceEventEmitter","Component","properties","data","pusher","lifetimes","attached","logger","info","bindTRTCCloudEvent","detached","unbindTRTCCloudEvent","exitRoom","methods","pusherAttributesChange","event","callback","setData","on","off","_pusherStateChangeHandler","pusherEventHandler","_pusherNetStatusHandler","pusherNetStatusHandler","_pusherErrorHandler","pusherErrorHandler","_pusherBGMStartHandler","pusherBGMStartHandler","_pusherBGMProgressHandler","pusherBGMProgressHandler","_pusherBGMCompleteHandler","pusherBGMCompleteHandler","_pusherAudioVolumeNotify","isEnterRoom","pusherAudioVolumeNotify"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;Q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iBP,KAfjB,EAewB;AAC7BhB,WAAKwB,sBAAL,CAA4BR,KAA5B;AACD,KAjBM;AAkBPS,uBAlBO,+BAkBaT,KAlBb,EAkBoB;AACzBhB,WAAK0B,kBAAL,CAAwBV,KAAxB;AACD,KApBM;AAqBPW,0BArBO,kCAqBgBX,KArBhB,EAqBuB;AAC5BhB,WAAK4B,qBAAL,CAA2BZ,KAA3B;AACD,KAvBM;AAwBPa,6BAxBO,qCAwBmBb,KAxBnB,EAwB0B;AAC/BhB,WAAK8B,wBAAL,CAA8Bd,KAA9B;AACD,KA1BM;AA2BPe,6BA3BO,qCA2BmBf,KA3BnB,EA2B0B;AAC/BhB,WAAKgC,wBAAL,CAA8BhB,KAA9B;AACD,KA7BM;AA8BPiB,4BA9BO,oCA8BkBjB,KA9BlB,EA8ByB;AAC9B,UAAI,CAACnB,UAAUqC,WAAf,EAA4B;AAC1B;AACD;AACDlC,WAAKmC,uBAAL,CAA6BnB,KAA7B;AACD;AAnCM;AAtBD,CAAV,E","file":"trtc-pusher.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","module.exports = require(\"@tencentcloud/trtc-cloud-wx\");","import TRTCCloud from '@tencentcloud/trtc-cloud-wx'\n\nconst trtcCloud = TRTCCloud.getTRTCShareInstance()\nconst trtc = trtcCloud.trtc\nconst InterfaceEventEmitter = trtcCloud.InterfaceEventEmitter\n\nComponent({\n properties: {\n // trtcCloud: {\n // type: Object,\n // }\n },\n data: {\n pusher: {},\n },\n lifetimes: {\n attached() {\n trtcCloud.logger.info('trtc-pusher attached')\n this.bindTRTCCloudEvent()\n },\n detached() {\n trtcCloud.logger.info('trtc-pusher detached')\n this.unbindTRTCCloudEvent()\n trtcCloud.exitRoom()\n },\n },\n\n\n methods: {\n pusherAttributesChange(event) {\n const {pusher, callback} = event\n this.setData({pusher}, callback)\n },\n bindTRTCCloudEvent() {\n InterfaceEventEmitter.on('pusherAttributesChange', this.pusherAttributesChange, this)\n },\n unbindTRTCCloudEvent() {\n InterfaceEventEmitter.off('
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"@tencentcloud/trtc-cloud-wx\"","webpack:///./src/trtc-pusher.js"],"names":["trtcCloud","TRTCCloud","getTRTCShareInstance","trtc","InterfaceEventEmitter","Component","properties","data","pusher","lifetimes","attached","logger","info","bindTRTCCloudEvent","detached","unbindTRTCCloudEvent","exitRoom","methods","pusherAttributesChange","event","callback","setData","on","off","_pusherStateChangeHandler","pusherEventHandler","_pusherNetStatusHandler","pusherNetStatusHandler","_pusherErrorHandler","pusherErrorHandler","_pusherBGMStartHandler","pusherBGMStartHandler","_pusherBGMProgressHandler","pusherBGMProgressHandler","_pusherBGMCompleteHandler","pusherBGMCompleteHandler","_pusherAudioVolumeNotify","isEnterRoom","pusherAudioVolumeNotify"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA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,KAlBb,EAkBoB;AACzBhB,WAAK0B,kBAAL,CAAwBV,KAAxB;AACD,KApBM;AAqBPW,0BArBO,kCAqBgBX,KArBhB,EAqBuB;AAC5BhB,WAAK4B,qBAAL,CAA2BZ,KAA3B;AACD,KAvBM;AAwBPa,6BAxBO,qCAwBmBb,KAxBnB,EAwB0B;AAC/BhB,WAAK8B,wBAAL,CAA8Bd,KAA9B;AACD,KA1BM;AA2BPe,6BA3BO,qCA2BmBf,KA3BnB,EA2B0B;AAC/BhB,WAAKgC,wBAAL,CAA8BhB,KAA9B;AACD,KA7BM;AA8BPiB,4BA9BO,oCA8BkBjB,KA9BlB,EA8ByB;AAC9B,UAAI,CAACnB,UAAUqC,WAAf,EAA4B;AAC1B;AACD;AACDlC,WAAKmC,uBAAL,CAA6BnB,KAA7B;AACD;AAnCM;AAtBD,CAAV,E","file":"trtc-pusher.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","module.exports = require(\"@tencentcloud/trtc-cloud-wx\");","import TRTCCloud from '@tencentcloud/trtc-cloud-wx'\n\nconst trtcCloud = TRTCCloud.getTRTCShareInstance()\nconst trtc = trtcCloud.trtc\nconst InterfaceEventEmitter = trtcCloud.InterfaceEventEmitter\n\nComponent({\n properties: {\n // trtcCloud: {\n // type: Object,\n // }\n },\n data: {\n pusher: {},\n },\n lifetimes: {\n attached() {\n trtcCloud.logger.info('trtc-pusher attached')\n this.bindTRTCCloudEvent()\n },\n detached() {\n trtcCloud.logger.info('trtc-pusher detached')\n this.unbindTRTCCloudEvent()\n trtcCloud.exitRoom()\n },\n },\n\n\n methods: {\n pusherAttributesChange(event) {\n const {pusher, callback} = event\n this.setData({pusher}, callback)\n },\n bindTRTCCloudEvent() {\n InterfaceEventEmitter.on('pusherAttributesChange', this.pusherAttributesChange, this)\n },\n unbindTRTCCloudEvent() {\n InterfaceEventEmitter.off('pusherAttributesChange', this.pusherAttributesChange)\n },\n // 请保持跟 wxml 中绑定的事件名称一致\n _pusherStateChangeHandler(event) {\n trtc.pusherEventHandler(event)\n },\n _pusherNetStatusHandler(event) {\n trtc.pusherNetStatusHandler(event)\n },\n _pusherErrorHandler(event) {\n trtc.pusherErrorHandler(event)\n },\n _pusherBGMStartHandler(event) {\n trtc.pusherBGMStartHandler(event)\n },\n _pusherBGMProgressHandler(event) {\n trtc.pusherBGMProgressHandler(event)\n },\n _pusherBGMCompleteHandler(event) {\n trtc.pusherBGMCompleteHandler(event)\n },\n _pusherAudioVolumeNotify(event) {\n if (!trtcCloud.isEnterRoom) {\n return\n }\n trtc.pusherAudioVolumeNotify(event)\n }\n }\n})\n"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/trtc-component-wx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "miniprogram_dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"webpack-node-externals": "^1.7.2"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@tencentcloud/trtc-cloud-wx": "^0.0.
|
|
70
|
+
"@tencentcloud/trtc-cloud-wx": "^0.0.17",
|
|
71
71
|
"trtc-wx-sdk": "^1.1.5"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/trtc-pusher.js
CHANGED
|
@@ -35,7 +35,7 @@ Component({
|
|
|
35
35
|
InterfaceEventEmitter.on('pusherAttributesChange', this.pusherAttributesChange, this)
|
|
36
36
|
},
|
|
37
37
|
unbindTRTCCloudEvent() {
|
|
38
|
-
InterfaceEventEmitter.off('
|
|
38
|
+
InterfaceEventEmitter.off('pusherAttributesChange', this.pusherAttributesChange)
|
|
39
39
|
},
|
|
40
40
|
// 请保持跟 wxml 中绑定的事件名称一致
|
|
41
41
|
_pusherStateChangeHandler(event) {
|