Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only call media.load() if it exists #875

Merged
merged 1 commit into from
Dec 5, 2016

Conversation

pedantic-git
Copy link

When running code that uses Wavesurfer under PhantomJS (even if not explicitly testing the Wavesurfer code), the JS interpreter crashes because PhantomJS DOM <audio> elements don't have a load() method. This change skips that one line if the method doesn't exist.

When running code that uses Wavesurfer under PhantomJS (even if not explicitly testing the Wavesurfer code), the JS interpreter crashes because PhantomJS DOM `<audio>` elements don't have a `load()` method. This change skips that one line if the method doesn't exist.
@katspaugh katspaugh merged commit 270f2b2 into katspaugh:master Dec 5, 2016
@katspaugh
Copy link
Owner

Cool, thanks!

@katspaugh
Copy link
Owner

Released in v 1.2.8.

mspae pushed a commit to mspae/wavesurfer.js that referenced this pull request Feb 5, 2017
When running code that uses Wavesurfer under PhantomJS (even if not explicitly testing the Wavesurfer code), the JS interpreter crashes because PhantomJS DOM `<audio>` elements don't have a `load()` method. This change skips that one line if the method doesn't exist.
thijstriemstra pushed a commit that referenced this pull request Feb 6, 2017
* fixed wrong var reference causing the bottom half of the waves to not draw

* replaced loops of this.canvases with correct for loop or forEach where possible

* turned unnecessary let into const in multicanvas

* Only call media.load() if it exists (#875)

* When running code that uses Wavesurfer under PhantomJS (even if not explicitly testing the Wavesurfer code), the JS interpreter crashes because PhantomJS DOM `<audio>` elements don't have a `load()` method. This change skips that one line if the method doesn't exist.

* Apply correct normalize absmax calculation to drawBars() (#916)

* fix draw wrong position while playing backward seeking (#918)

* fix draw wrong position while playing backward seeking

* fix spelling mistake

* add getPlaybackRate (#936)

* added es6 method short notation for #f185d97c825a92bfb69be80091587a9a19f66594

* Updated render function for drawPeaks/getPeaks (#959)

* Updated the render function to call the new version of the getPeaks and drawPeaks calls which now require start and end parameters.  Fixes flat waveform drawing in minimap plugin.

* changed vars to const where possible in ported bugfix commits from master branch

* fixed split channel call to drawWave and drawPeaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants