Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mister-ben committed Jul 21, 2024
1 parent e78bcc7 commit 62939ee
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 31 deletions.
16 changes: 13 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"@babel/preset-env": "^7.9.0",
"@rollup/plugin-image": "^3.0.2",
"@rollup/plugin-replace": "^2.4.1",
"@rollup/pluginutils": "^5.1.0",
"@types/node": "^18.8.3",
"access-sniff": "^3.2.0",
"autoprefixer": "^10.2.5",
Expand Down Expand Up @@ -153,6 +154,7 @@
"rollup-plugin-multi-entry": "^2.0.2",
"rollup-plugin-node-resolve": "^4.2.4",
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-stub": "^1.2.0",
"rollup-plugin-svg": "^2.0.0",
"sass": "^1.34.0",
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import image from '@rollup/plugin-image';
import istanbul from 'rollup-plugin-istanbul';
import externalGlobals from 'rollup-plugin-external-globals';
import svg from 'rollup-plugin-svg';
import { excludeLines } from './build/rollup-ignore';

const excludeCoverage = [
'test/**',
Expand Down Expand Up @@ -143,6 +144,10 @@ export default cliargs => [
},
external: externals.browser,
plugins: [
excludeLines({
include: 'src/**',
patterns: [/\/\/\s*exclude\s*start[\s\S]*?\/\/\s*exclude\s*end/g]
}),
alias({
'video.js': path.resolve(__dirname, './src/js/video.js')
}),
Expand Down
64 changes: 36 additions & 28 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -5325,6 +5325,42 @@ class Player extends Component {
*/
this.trigger('playbackrateschange');
}

/**
* Reports whether or not a player has a plugin available.
*
* This does not report whether or not the plugin has ever been initialized
* on this player. For that, [usingPlugin]{@link Player#usingPlugin}.
*
* @method hasPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player has the requested plugin available.
*/
// exclude start
hasPlugin(name) {
return false;
}
// exclude end

/**
* Reports whether or not a player is using a plugin by name.
*
* For basic plugins, this only reports whether the plugin has _ever_ been
* initialized on this player.
*
* @method Player#usingPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player is using the requested plugin.
*/
usingPlugin(name) {
return false;
}
}

/**
Expand Down Expand Up @@ -5527,33 +5563,5 @@ TECH_EVENTS_RETRIGGER.forEach(function(event) {
* @type {Event}
*/

/**
* Reports whether or not a player has a plugin available.
*
* This does not report whether or not the plugin has ever been initialized
* on this player. For that, [usingPlugin]{@link Player#usingPlugin}.
*
* @method Player#hasPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player has the requested plugin available.
*/

/**
* Reports whether or not a player is using a plugin by name.
*
* For basic plugins, this only reports whether the plugin has _ever_ been
* initialized on this player.
*
* @method Player#usingPlugin
* @param {string} name
* The name of a plugin.
*
* @return {boolean}
* Whether or not this player is using the requested plugin.
*/

Component.registerComponent('Player', Player);
export default Player;

0 comments on commit 62939ee

Please sign in to comment.