Static Properties
Static properties here refer to first-level properties mounted on the constructor, which are rarely used.
instances
Returns an array of all player instances. This property can be useful when you need to manage multiple player instances simultaneously.
console.info([...Artplayer.instances]);
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
console.info([...Artplayer.instances]);
version
Returns the version information of the player.
console.info(Artplayer.version);
env
Returns the environment variables of the player.
console.info(Artplayer.env);
build
Returns the build timestamp of the player.
console.info(Artplayer.build);
config
Returns the default configuration for videos.
console.info(Artplayer.config);
utils
Returns the collection of utility functions for the player.
console.info(Artplayer.utils);
For all utility functions, please refer to:
scheme
Returns the validation schema for player options.
console.info(Artplayer.scheme);
Emitter
Returns the constructor for the event emitter.
console.info(Artplayer.Emitter);
validator
Returns the validation function for options.
console.info(Artplayer.validator);
kindOf
Returns the type detection utility function.
console.info(Artplayer.kindOf);
html
Returns the HTML string required by the player.
console.info(Artplayer.html);
option
Returns the default options for the player.
console.info(Artplayer.option);