evmux-app-framework 0.1.14 → 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,14 +176,10 @@ let createEventResultObject = (requestName, eventName, result) => {
|
|
|
182
176
|
}
|
|
183
177
|
}
|
|
184
178
|
|
|
185
|
-
|
|
186
|
-
if (this.getComponentCount(userAppInstanceId) <= 1) return 1
|
|
187
|
-
const isPrv = componentId.startsWith('live_')
|
|
188
|
-
if (this._app && this._app.studioMode && !isPrv) return 0
|
|
179
|
+
getComponentVolumeMultiplier(userAppInstanceId, componentId) {
|
|
189
180
|
const appInstance = this._userAppInstances[userAppInstanceId]
|
|
190
181
|
const comp = appInstance && appInstance.instances && appInstance.instances[componentId]
|
|
191
|
-
|
|
192
|
-
return 1
|
|
182
|
+
return comp && comp.volumeMultiplier !== undefined ? comp.volumeMultiplier : 1
|
|
193
183
|
}
|
|
194
184
|
|
|
195
185
|
signalApp(userAppInstanceId, data){
|
|
@@ -264,7 +254,7 @@ let createEventResultObject = (requestName, eventName, result) => {
|
|
|
264
254
|
}
|
|
265
255
|
else if (requestObj.request == availableRequests.getVolumeMultiplier)
|
|
266
256
|
{
|
|
267
|
-
result = { value: this.
|
|
257
|
+
result = { value: this.getComponentVolumeMultiplier(requestObj.userAppInstanceId, requestObj.componentId) }
|
|
268
258
|
}
|
|
269
259
|
else {
|
|
270
260
|
for (let i = 0; i < this._requestHandlers.length; i++)
|