-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
MediaElement Preload #854
Conversation
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indtentation.
Looks good to me! |
@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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still 1 space wrong.
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😄
@katspaugh I hope indentations are solved now. GitHub webditor doesn't display invisible characters --' |
Merged, thanks! |
@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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. --'
@X-Raym can you also update the changelog? |
@thijstriemstra ok, what version number should I put ? |
1.2.3, @X-Raym |
@thijstriemstra @katspaugh #857 Done ! |
Add a ‘preload’ parameter to load function to choose the preload HTML5 audio attribute value if MediaElement.