GIF alerts setup


PhantomBot Version: 2.4.2
OS Version: Raspian Linux 4.14.34-v7+ (arm)
Java Version: 1.8.0_65
Browser and Version (for Panel Support): Chrome (latest)
Stock PhantomBot: Yes

Let us know what help you need:
Currently I simply want to setup some simple GIF alerts and tried to follow instructions as given here: How to Setup GIF Alerts
But following the example with additional CSS options

!addcom !command (alert money.gif,10,background:#000;top:50%)

I get following error in Chrome

Uncaught TypeError: Failed to set the 'volume' property on 'HTMLMediaElement': The provided double value is non-finite.
    at HTMLDivElement.<anonymous> (index.js:280)
    at HTMLDivElement.r.complete (jquery.min.js:3)
    at f (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at u (jquery.min.js:1)
    at ce.fx.tick (jquery.min.js:3)

Any help would be much appreciated.


Okay looking through the code I think I might found how the GIF alerts are handled and how to fix my problem.

// from resources/web/alerts/js/index.js:L240
gifSettingParts.forEach(function(value, index) {
        switch (index) {
            case 0:
                gifFile = value;
            case 1:
                gifDuration = (parseInt(value) * 1000);
            case 2:
                gifVolume = value;
            case 3:
                gifCss = value;

That shows the Setup GIF Alerts is not up to date anymore. The settings now include the option to adjust the volume before the custom CSS.

Considering this a command with GIF alert and complete parameters would look like this:


Hope I got that right but if not I would appreciate any hint to solve this the right way.

closed #3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.