question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE11: Fallback to MediaElement not working, it always tries to access AudioContext

See original GitHub issue

README says that the player will fall back on audio element (without graphics) on browser that don’t support WebAudio (i.e. IE 11), but still it doesn’t look to work at all if WebAudio is missing.

IE 11, for example, throws an error because wavesurfer tries to access AudioContext or window.webkitAudioContext, I think from here: https://github.com/katspaugh/wavesurfer.js/blob/ff5d8b442bc503890068b5a206eaf9142fffbf1f/src/webaudio.js#L76-L77

You can test the issue just by opening the audio element example page on your site in IE 11. Here’s the error in the browser console (pardon the Italian locale, the red text says something like “Invalid action for the object”):

byzanz-record

Maybe the fallback mechanisms has been dropped in newer releases? Thanks.

Wavesurfer.js version(s): 2.2.1
Browser version(s): Internet Explorer 11

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
thijstriemstracommented, Apr 10, 2019

That’s good news. Leaving the demo’s with .wav is fine then, if people want to use IE11 they’ll figure out MP3 is their only option.

1reaction
lorenzoscommented, Apr 10, 2019

@thijstriemstra It does work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AudioContext Web audio API not working in IE(11)
My understanding is that IE has never supported WebAudio and never will. All you can do is detect if window.AudioContext exists and give...
Read more >
mediaelement | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
MediaElementAudioSourceNode.mediaElement - Web APIs
An HTMLMediaElement representing the element which contains the source of audio for the node. Examples. const audioCtx = new window.AudioContext ...
Read more >
wavesurfer js alternative
It will fallback to Audio Element without graphics in other browsers (IE 11 and lower). There is a tool to convert existing annotated...
Read more >
web-audio-player - npm
You can use detect-media-element-source to approximately feature detect whether createMediaElementSource will work or not, but you may be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found