Skip to content

Commit

Permalink
Deploying to gh-pages from @ a7fe349 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cycjimmy committed Aug 23, 2024
1 parent de7ad03 commit 1cf1037
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions h5-video-player.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
* @param str
* @returns {boolean}
*/
var isString = (str => typeof str === 'string' && str.constructor === String);
var isString = str => typeof str === 'string' && str.constructor === String;

/**
* compatibility scheme for traversing object property methods Object.entries
* @param obj
* @returns {Iterator.<*>|*}
*/
var entries = (obj => {
var entries = obj => {
var replaceFunc = o => {
var arr = [];
Object.keys(o).forEach(key => {
Expand All @@ -86,29 +86,29 @@
return Object.entries(obj);
}
return replaceFunc(obj);
});
};

/**
* element add styles
* @param element
* @param styles(obj)
*/
var addStyles = ((element, styles) => {
var addStyles = (element, styles) => {
entries(styles).forEach(_ref => {
var [k, v] = _ref;
if (Object.prototype.hasOwnProperty.call(styles, k)) {
// eslint-disable-next-line no-param-reassign
element.style[k] = v;
}
});
});
};

/**
* judge video playing
* @param video
* @return {boolean}
*/
var isVideoPlaying = (video => video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2);
var isVideoPlaying = video => video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2;

/**
* playButton
Expand All @@ -125,14 +125,14 @@
* @param arr
* @returns {boolean}
*/
var isArray = (arr => Object.prototype.toString.call(arr).slice(8, -1) === 'Array');
var isArray = arr => Object.prototype.toString.call(arr).slice(8, -1) === 'Array';

/**
* determine an object
* @param o
* @returns {boolean}
*/
var isObject = (o => Object.prototype.toString.call(o) === '[object Object]');
var isObject = o => Object.prototype.toString.call(o) === '[object Object]';

/**
* wrapper
Expand Down

0 comments on commit 1cf1037

Please sign in to comment.