evmux-app-framework 0.1.13 → 0.1.15
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
|
@@ -169,12 +169,6 @@ let createEventResultObject = (requestName, eventName, result) => {
|
|
|
169
169
|
component.window.postMessage(JSON.stringify(eventObj), "*")
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
getComponentCount(userAppInstanceId) {
|
|
173
|
-
const appInstance = this._userAppInstances[userAppInstanceId]
|
|
174
|
-
if (!appInstance || !appInstance.instances) return 0
|
|
175
|
-
return Object.keys(appInstance.instances).length
|
|
176
|
-
}
|
|
177
|
-
|
|
178
172
|
setComponentProps(userAppInstanceId, componentId, props) {
|
|
179
173
|
const appInstance = this._userAppInstances[userAppInstanceId]
|
|
180
174
|
if (appInstance && appInstance.instances && appInstance.instances[componentId]) {
|
|
@@ -182,13 +176,10 @@ let createEventResultObject = (requestName, eventName, result) => {
|
|
|
182
176
|
}
|
|
183
177
|
}
|
|
184
178
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
const comp = this._userAppInstances[userAppInstanceId]?.instances?.[componentId]
|
|
190
|
-
if (this._app?.isLandscapeAndPortraitMode && comp?.portraitMode) return 0
|
|
191
|
-
return 1
|
|
179
|
+
getComponentVolumeMultiplier(userAppInstanceId, componentId) {
|
|
180
|
+
const appInstance = this._userAppInstances[userAppInstanceId]
|
|
181
|
+
const comp = appInstance && appInstance.instances && appInstance.instances[componentId]
|
|
182
|
+
return comp && comp.volumeMultiplier !== undefined ? comp.volumeMultiplier : 1
|
|
192
183
|
}
|
|
193
184
|
|
|
194
185
|
signalApp(userAppInstanceId, data){
|
|
@@ -263,7 +254,7 @@ let createEventResultObject = (requestName, eventName, result) => {
|
|
|
263
254
|
}
|
|
264
255
|
else if (requestObj.request == availableRequests.getVolumeMultiplier)
|
|
265
256
|
{
|
|
266
|
-
result = { value: this.
|
|
257
|
+
result = { value: this.getComponentVolumeMultiplier(requestObj.userAppInstanceId, requestObj.componentId) }
|
|
267
258
|
}
|
|
268
259
|
else {
|
|
269
260
|
for (let i = 0; i < this._requestHandlers.length; i++)
|