--- title: 快速上手 sidebar_position: 1 slug: /zh-cn --- ## 安装 ### 通过 `npm` 安装: ```bash $ npm install artplayer ``` ### 通过 `yarn` 安装: ```bash $ yarn add artplayer ``` 然后加载 `artplayer` 模块: ```js // ES6 import Artplayer from 'artplayer'; // CommonJS const Artplayer = require('artplayer'); ``` ### 通过 `script` 安装: ```html ``` 然后你可以通过 `window.Artplayer` 访问到构造函数 ## 使用 `Artplayer` 是一个构造函数,通过 `new` 关键字进行实例化 ```html