maEventAudio issues
-
Hi,
I am trying to get ma-event-audio to work in a custom web app (in overrides).
The ONLY reference I could find anywhere is on the API Documents:
<ma-event-audio audio-files="{CRITICAL: '/audio/critical.mp3'"></ma-event-audio>
does not work. Nor does:
<ma-event-audio audio-files="{CRITICAL: '/audio/critical.mp3'}"></ma-event-audio>
Note the added closing "}"
Nor:
<ma-event-audio audio-files="./audio/critical.mp3" event-level="'URGENT'"></ma-event-audio>
I have have a working event table on the same page:
<md-card flex="100" flex-xs="100" style="padding: 0px;"> <ma-events-table limit="5" alarm-level="'URGENT'" acknowledged = "'false'" from="from" to="to"></ma-events-table> </md-card>
-
@balistar said in maEventAudio issues:
<ma-event-audio audio-files="{CRITICAL: '/audio/critical.mp3'}"></ma-event-audio>
This is the correct syntax. Unfortuantely there is a bug in this component, I have fixed it for the next release. Thanks for making me aware.
As a work around this should get it fixed:
<ma-event-audio audio-files="{CRITICAL: '/audio/critical.mp3'}" read-aloud="{}"></ma-event-audio>
-
Thanks Jared,
Your work around works perfectly.
Alarms goes off on Events. This makes it even more clear to me that I must be missing something in my event table configuration.
<ma-events-table limit="5" alarm-level="'URGENT'" acknowledged = "'false'" from="from" to="to"></ma-events-table>
The now working ma-event-audio is sounding on events, but those events are not updated on the Event Table list. Only on a page refresh. I have a 20 datapoints on the same page that are updated every minute.
For that matter. The Acknowledge "box" is not showing any events, even though there are "not-acknowledged" events in the table (after page page refresh).
core 3.2.2
-
@balistar said in maEventAudio issues:
The now working ma-event-audio is sounding on events, but those events are not updated on the Event Table list. Only on a page refresh. I have a 20 datapoints on the same page that are updated every minute.
For that matter. The Acknowledge "box" is not showing any events, even though there are "not-acknowledged" events in the table (after page page refresh).Glad you got the audio working. Its curious that your events page is not showing the events as it uses the same mechanism to get events as the audio component (websocket). Do you have your event table filters set correctly? I have fixed at least one bug on this table for 3.3 so hopefully that will fix your issue.
-
When I added
date-filter="true"
events started to get listed without having to refresh the page. Thanks.
My table now is:
<ma-events-table limit="5" alarm-level="'URGENT'" acknowledged = "'false'" date-filter="true" from="from" to="to"></ma-events-table>
The "Acknowledge Box" still only shows 0 events.
Another issue with maEventAudio is that on an Android there is no sound. I (nor you guys I suspect) have much experience with mobile. Perhaps it is related to the longstanding HTLM5 audio issues that mobile apps have. Permissions etc...
PS what is the deal with "'xxx'" vs "xxx"? Your documentation and examples sometimes conflict.
-
@balistar said in maEventAudio issues:
When I added
date-filter="true"events started to get listed without having to refresh the page. Thanks.
OK thats odd. I'll take a look at that.
@balistar said in maEventAudio issues:
The "Acknowledge Box" still only shows 0 events.
OK yeah that might be a bug.
@balistar said in maEventAudio issues:
Another issue with maEventAudio is that on an Android there is no sound. I (nor you guys I suspect) have much experience with mobile. Perhaps it is related to the longstanding HTLM5 audio issues that mobile apps have. Permissions etc...
Yeah we use the standard HTML5 audio interfaces. It does seem that Chrome on Android blocks audio unless its a direct reaction to a user event.
https://bugs.chromium.org/p/chromium/issues/detail?id=178297
From reading the comments it seems that if you add Mango to your homescreen the audio might just work.@balistar said in maEventAudio issues:
PS what is the deal with "'xxx'" vs "xxx"? Your documentation and examples sometimes conflict.
Typically attributes are evaluated as expressions. So the value of the variable will be passed through to the directive/component in this example
<tag attribute="variableName"></tag>
However you can just pass a string through like this -
<tag attribute="'string value'"></tag>
However some attributes are treated as plain strings, so the directive in this case would just receive the string value "ONE".
<tag-2 attribute="ONE"></tag-2>
If you want to evaluate an expression for these types of attributes you can use the curly braces
<tag-2 attribute="{{ myVariable }}"></tag-2>
So yes, all in all it can be a little confusing. If you have any examples of directives where the documentation isn't clear let me know. We do need to have a bit of a push on documentation.
-
@balistar
I came checked into this and if you useacknowledged="false"
instead ofacknowledged="'false'"
you should get the correct result. -
@jared-wiltshire said in maEventAudio issues:
@balistar
I came checked into this and if you useacknowledged="false"
instead ofacknowledged="'false'"
you should get the correct result.Thanks, that worked. "Acknowledge Box" shows all filtered events.