Author Topic: Reference error: soundmanager is not defined  (Read 1928 times)

Jon Moore

  • Rookie
  • *
  • Posts: 4
Reference error: soundmanager is not defined
« on: December 14, 2017, 12:33:01 pm »
Hello,

While receiving help about why a different plugin wasn't working as advertised, it was pointed out to me that I have an error on my site, presumably related to the powerpress widget. I get this message:

Uncaught ReferenceError: soundManager is not defined
    at bplayer-sm2.js:220

What do I do to fix this? I've spent some time googling suggestions, without much luck. Please help.

Here is a page where the issue can be found: https://greeklifetoday.com/fraternity/alpha-sigma-phi-at-bgsu-comforts-grieving-families/

Shawn Thorpe

  • Administrator
  • Hero Member
  • *****
  • Posts: 2060
Re: Reference error: soundmanager is not defined
« Reply #1 on: December 14, 2017, 11:29:37 pm »
I don't see any evidence of an error on that site. Where is the error occurring?

Also, please ensure that you're running the latest version of PowerPress, as an update was just released.

Jon Moore

  • Rookie
  • *
  • Posts: 4
Re: Reference error: soundmanager is not defined
« Reply #2 on: December 18, 2017, 09:01:07 am »
Thanks for the response. I checked and the latest version is installed.

If I inspect any of the post pages (episodes) that have the player, the error shows in the Console tab.

To be clear, I haven't been experiencing any issues, but the support team of another plugin pointed it out to me and said I should look into it. Just trying to be proactive.


Shawn Thorpe

  • Administrator
  • Hero Member
  • *****
  • Posts: 2060
Re: Reference error: soundmanager is not defined
« Reply #3 on: December 18, 2017, 11:20:12 am »
Is it possible to respond with either a copy/paste of the error message or a link to a screenshot of the error message?

Jon Moore

  • Rookie
  • *
  • Posts: 4
Re: Reference error: soundmanager is not defined
« Reply #4 on: December 20, 2017, 09:13:21 am »
The error message I see in the Console tab is this:

2VM8861 bplayer-sm2.js:220 Uncaught ReferenceError: soundManager is not defined
    at VM8861 bplayer-sm2.js:220
(anonymous) @ VM8861 bplayer-sm2.js:220

When I click the link to take me to the error, it takes me to this bit of code. Not sure if this is what you're looking for, but I'm trying my best.

soundManager.setup({
    useFastPolling: true,
    useHighPerformance: true,
    onready: function() {
        //time = convertTime(time);
        //soundManager.setPosition('audio',time*1000);
        audio = soundManager.createSound({
            id: 'audio',
            url: media_url,
            from: time*1000,
            //autoLoad: true,
            whileloading: function() {
                //this.position = time*1000;
                player.timeTotal.textContent = formatMilliseconds(audio.durationEstimate);
                if ( this.bytesLoaded <= 1 ) {
                    displayLoadingBar(audio.bytesLoaded, audio.bytesTotal);
                }
            },
            whileplaying: function() {
                player.timeElapsed.textContent = formatMilliseconds(audio.position);
                var progressMaxLeft = 100,
                    left,
                    width;
                left = Math.min(progressMaxLeft, Math.max(0, (progressMaxLeft * (this.position / this.durationEstimate)))) + '%';
                width = Math.min(100, Math.max(0, (100 * this.position / this.durationEstimate))) + '%';
                if (this.duration) {
                    player.progressBall.style.left = left;
                    player.progressBar.style.width = width;
                }

            },
            onload: function() {
                player.timeTotal.textContent = formatMilliseconds(audio.duration);
            },
            onfinish: function() {
                player.progressBall.style.left = '0%';
                player.timeElapsed.textContent = '';
                player.btnPlay.classList.remove('is-playing');

                var event;

                try {
                    // Internet Explorer doesn't like this statement
                    event = new Event('click');
                } catch (ex) {
                    event = document.createEvent('MouseEvent');
                    event.initEvent('click', true, false);
                }
                player.btnStop.dispatchEvent(event);
            }

        });
    }
});

Shawn Thorpe

  • Administrator
  • Hero Member
  • *****
  • Posts: 2060
Re: Reference error: soundmanager is not defined
« Reply #5 on: December 20, 2017, 05:49:55 pm »
I've asked the Blubrry dev team to take a look at your issue. A reply will be posted here as soon as possible.

Shawn Thorpe

  • Administrator
  • Hero Member
  • *****
  • Posts: 2060
Re: Reference error: soundmanager is not defined
« Reply #6 on: January 03, 2018, 01:08:19 pm »
The dev team stated that they are aware of these error messages and that they should be addressed in the next version of PowerPress. These error messages shouldn't have any impact on the media player's functionality.

Jon Moore

  • Rookie
  • *
  • Posts: 4
Re: Reference error: soundmanager is not defined
« Reply #7 on: January 04, 2018, 11:45:19 am »
Ok, thank you for your diligent assistance!