Formatting
This commit is contained in:
parent
889712761a
commit
5d38497f07
4
dist/plyr.js
vendored
4
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
22
gulpfile.js
22
gulpfile.js
@ -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"),
|
||||||
@ -77,20 +77,20 @@ function loadJSON(path) {
|
|||||||
// Create a file from a string
|
// Create a file from a string
|
||||||
// http://stackoverflow.com/questions/23230569/how-do-you-create-a-file-from-a-string-in-gulp
|
// http://stackoverflow.com/questions/23230569/how-do-you-create-a-file-from-a-string-in-gulp
|
||||||
function createFile(filename, string) {
|
function createFile(filename, string) {
|
||||||
var src = require('stream').Readable({
|
var src = require('stream').Readable({
|
||||||
objectMode: true
|
objectMode: true
|
||||||
});
|
});
|
||||||
src._read = function () {
|
src._read = function () {
|
||||||
this.push(new gutil.File({
|
this.push(new gutil.File({
|
||||||
cwd: "",
|
cwd: "",
|
||||||
base: "",
|
base: "",
|
||||||
path: filename,
|
path: filename,
|
||||||
contents: new Buffer(string),
|
contents: new Buffer(string),
|
||||||
// stats also required for some functions
|
// stats also required for some functions
|
||||||
// https://nodejs.org/api/fs.html#fs_class_fs_stats
|
// https://nodejs.org/api/fs.html#fs_class_fs_stats
|
||||||
stat: {
|
stat: {
|
||||||
size: string.length
|
size: string.length
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
this.push(null);
|
this.push(null);
|
||||||
}
|
}
|
||||||
@ -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 */
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user