ArtPlayer Docs

Documentation

Static Properties Permalink to "Static Properties"

Here, static properties refer to the first-level properties attached to the constructor, which are rarely used.

instances Permalink to "`instances`"

Returns an array of all player instances. This property can be useful when you need to manage multiple players simultaneously.

▶ Run Code
js
console.info([...Artplayer.instances]);

var art = new Artplayer({
    container: '.artplayer-app',
    url: '/assets/sample/video.mp4',
});

console.info([...Artplayer.instances]);

version Permalink to "`version`"

Returns the version information of the player.

▶ Run Code
js
console.info(Artplayer.version);

env Permalink to "`env`"

Returns the environment variables of the player.

▶ Run Code
js
console.info(Artplayer.env);

build Permalink to "`build`"

Returns the build timestamp of the player.

▶ Run Code
js
console.info(Artplayer.build);

config Permalink to "`config`"

Returns the default configuration for videos.

▶ Run Code
js
console.info(Artplayer.config);

utils Permalink to "`utils`"

Returns the collection of utility functions for the player.

▶ Run Code
js
console.info(Artplayer.utils);

For all utility functions, please refer to the following address:

artplayer/types/utils.d.ts

scheme Permalink to "`scheme`"

Returns the validation schema for player options.

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter Permalink to "`Emitter`"

Returns the constructor of the event emitter.

▶ Run Code
js
console.info(Artplayer.Emitter);

validator Permalink to "`validator`"

Returns the validation function for options.

▶ Run Code
js
console.info(Artplayer.validator);

kindOf Permalink to "`kindOf`"

Returns the type detection utility function.

▶ Run Code
js
console.info(Artplayer.kindOf);

html Permalink to "`html`"

Returns the html string required by the player.

▶ Run Code
js
console.info(Artplayer.html);

option Permalink to "`option`"

Returns the default options of the player.

▶ Run Code
js
console.info(Artplayer.option);