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

MediaElement Preload #854

Merged
merged 10 commits into from
Nov 7, 2016
Merged

MediaElement Preload #854

merged 10 commits into from
Nov 7, 2016

Conversation

X-Raym
Copy link
Contributor

@X-Raym X-Raym commented Nov 7, 2016

Add a ‘preload’ parameter to load function to choose the preload HTML5 audio attribute value if MediaElement.

var my = this;

var media = document.createElement(this.mediaType);
media.controls = this.params.mediaControls;
media.autoplay = this.params.autoplay || false;
media.preload = 'auto';
media.preload = preload == null ? 'auto' : preload;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is off.

@@ -49,14 +49,15 @@ WaveSurfer.util.extend(WaveSurfer.MediaElement, {
* @param {String} url path to media file
* @param {HTMLElement} container HTML element
* @param {Array} peaks array of peak data
* @param {String} preload HTML 5 preload attribute value
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indtentation.

@katspaugh
Copy link
Owner

Looks good to me!

@X-Raym
Copy link
Contributor Author

X-Raym commented Nov 7, 2016

@katspaugh should be corrected now :P

var my = this;

var media = document.createElement(this.mediaType);
media.controls = this.params.mediaControls;
media.autoplay = this.params.autoplay || false;
media.preload = 'auto';
media.preload = preload == null ? 'auto' : preload;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still 1 space wrong.

Copy link
Contributor Author

@X-Raym X-Raym Nov 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katspaugh Arf, github webditor shows this as perfectly aligned. I created the indentation by copy pasting from the above line.
Well, should be corrected now.

@@ -412,6 +412,7 @@ var WaveSurfer = {
this.decodeArrayBuffer(arraybuffer, (function (buffer) {
this.backend.buffer = buffer;
this.drawBuffer();
this.fireEvent('waveform_ME_noPeaks');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something extra, let's remove.

Copy link
Contributor Author

@X-Raym X-Raym Nov 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katspaugh Yep, it will be my next proposition, we'll talk about that later 😄

@X-Raym
Copy link
Contributor Author

X-Raym commented Nov 7, 2016

@katspaugh I hope indentations are solved now. GitHub webditor doesn't display invisible characters --'

@katspaugh katspaugh merged commit a450a7e into katspaugh:master Nov 7, 2016
@katspaugh
Copy link
Owner

Merged, thanks!

@X-Raym
Copy link
Contributor Author

X-Raym commented Nov 7, 2016

@katspaugh Thanks for having accepted this request. Cheers !

@@ -1192,14 +1192,15 @@ WaveSurfer.util.extend(WaveSurfer.MediaElement, {
* @param {String} url path to media file
* @param {HTMLElement} container HTML element
* @param {Array} peaks array of peak data
* @param {String} preload HTML 5 preload attribute value
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, the indentation is still wrong here.

Copy link
Contributor Author

@X-Raym X-Raym Nov 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katspaugh Arf, GitHub web editor is really not friendly with indentation display... :/
Do you want me to fix this ou can you do it ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do it when doing a release, no worries.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katspaugh Sorry for the inconvenience. Indentations are not displayed and created equally between editors. --'

@thijstriemstra
Copy link
Contributor

@X-Raym can you also update the changelog?

@X-Raym
Copy link
Contributor Author

X-Raym commented Nov 8, 2016

@thijstriemstra ok, what version number should I put ?

@katspaugh
Copy link
Owner

1.2.3, @X-Raym

@X-Raym
Copy link
Contributor Author

X-Raym commented Nov 8, 2016

@thijstriemstra @katspaugh #857 Done !

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

3 participants