ArtPlayer 文档

文档导航

静态属性 Permalink to "静态属性"

这里的 静态属性 是指挂载在 构造函数一级属性,非常少使用

instances Permalink to "`instances`"

返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性

▶ 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`"

返回播放器的版本信息

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

env Permalink to "`env`"

返回播放器的环境变量

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

build Permalink to "`build`"

返回播放器的打包时间

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

config Permalink to "`config`"

返回视频的默认配置

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

utils Permalink to "`utils`"

返回播放器的工具函数集合

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

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme Permalink to "`scheme`"

返回播放器选项的校验方案

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

Emitter Permalink to "`Emitter`"

返回事件分发器的构造函数

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

validator Permalink to "`validator`"

返回选项的校验函数

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

kindOf Permalink to "`kindOf`"

返回类型检测的函数工具

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

html Permalink to "`html`"

返回播放器所需的 html 字符串

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

option Permalink to "`option`"

返回播放器的默认选项

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