Formatting

This commit is contained in:
Sam Potts 2017-04-15 23:22:14 +10:00
parent 889712761a
commit 5d38497f07
3 changed files with 43 additions and 22 deletions

4
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,9 @@
// ========================================================================== // ==========================================================================
// Gulp build script // Gulp build script
// ========================================================================== // ==========================================================================
/*global require, __dirname,Buffer*/ /* global require, __dirname,Buffer */
/*jshint -W079 */ /* jshint -W079 */
/* beautify ignore:start */
var fs = require("fs"), var fs = require("fs"),
path = require("path"), path = require("path"),
gulp = require("gulp"), gulp = require("gulp"),
@ -335,3 +335,5 @@ gulp.task("open", function () {
gulp.task("publish", function () { gulp.task("publish", function () {
run(tasks.js, tasks.less, tasks.sprite, "cdn", "demo"); run(tasks.js, tasks.less, tasks.sprite, "cdn", "demo");
}); });
/* beautify ignore:end */

View File

@ -220,7 +220,27 @@
loop: null loop: null
}, },
// Events to watch on HTML5 media elements // Events to watch on HTML5 media elements
events: ['ready', 'ended', 'progress', 'stalled', 'playing', 'waiting', 'canplay', 'canplaythrough', 'loadstart', 'loadeddata', 'loadedmetadata', 'timeupdate', 'volumechange', 'play', 'pause', 'error', 'seeking', 'seeked', 'emptied'], events: [
'ready',
'ended',
'progress',
'stalled',
'playing',
'waiting',
'canplay',
'canplaythrough',
'loadstart',
'loadeddata',
'loadedmetadata',
'timeupdate',
'volumechange',
'play',
'pause',
'error',
'seeking',
'seeked',
'emptied'
],
// Logging // Logging
logPrefix: '' logPrefix: ''
}; };
@ -716,8 +736,7 @@
} }
// Fullscreen API // Fullscreen API
var fullscreen; var fullscreen = (function() {
(function() {
// Determine the prefix // Determine the prefix
var prefix = (function() { var prefix = (function() {
var value = false; var value = false;
@ -741,7 +760,7 @@
return value; return value;
})(); })();
fullscreen = { return {
prefix: prefix, prefix: prefix,
// Yet again Microsoft awesomeness, // Yet again Microsoft awesomeness,
// Sometimes the prefix is 'ms', sometimes 'MS' to keep you on your toes // Sometimes the prefix is 'ms', sometimes 'MS' to keep you on your toes
@ -989,8 +1008,8 @@
attributes.forEach(function(attribute) { attributes.forEach(function(attribute) {
insertElement(type, player.elements.media, attribute); insertElement(type, player.elements.media, attribute);
}); });
}
} }
}
// Get icon URL // Get icon URL
function getIconUrl() { function getIconUrl() {
@ -1396,7 +1415,7 @@
config.tracks.forEach(function(track, index) { config.tracks.forEach(function(track, index) {
if (is.function(track)) { if (is.function(track)) {
return; return;
} }
var option = createElement('li'); var option = createElement('li');
@ -1411,7 +1430,7 @@
}); });
} }
break; break;
} }
pane.appendChild(options); pane.appendChild(options);
@ -3094,7 +3113,7 @@
// It should be a number, but parse it just incase // It should be a number, but parse it just incase
var duration = parseInt(config.duration); var duration = parseInt(config.duration);
// True duration // True duration
var mediaDuration = 0; var mediaDuration = 0;
// Only if duration available // Only if duration available
@ -3460,10 +3479,10 @@
var display = (displayHours ? hours + ':' : '') + mins + ':' + secs; var display = (displayHours ? hours + ':' : '') + mins + ':' + secs;
// Render // Render
element.textContent = label; element.textContent = display;
// Return for looping // Return for looping
return label; return display;
} }
// Show the duration on metadataloaded // Show the duration on metadataloaded