mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
42 lines
1000 B
Plaintext
42 lines
1000 B
Plaintext
---
|
|
title: Hls 画质插件
|
|
sidebar_position: 4
|
|
---
|
|
|
|
## 说明
|
|
|
|
通过该插件,可以添加 `Hls` 画质列表到控制栏或者设置面板里
|
|
|
|
## 演示
|
|
|
|
👉 [查看完整演示](https://artplayer.org/?libs=https://cdnjs.cloudflare.com/ajax/libs/hls.js/8.0.0-beta.3/hls.min.js%0A./uncompiled/artplayer-plugin-hls-quality/index.js&example=hls.quality)
|
|
|
|
## 安装
|
|
|
|
### 通过 `npm` 安装:
|
|
|
|
```bash
|
|
$ npm install artplayer-plugin-hls-quality
|
|
```
|
|
|
|
### 通过 `yarn` 安装:
|
|
|
|
```bash
|
|
$ yarn add artplayer-plugin-hls-quality
|
|
```
|
|
|
|
### 通过 `script` 安装:
|
|
|
|
```html
|
|
<!-- 本地 -->
|
|
<script src="path/to/artplayer-plugin-hls-quality.js"></script>
|
|
|
|
<!-- jsdelivr -->
|
|
<script src="https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js"></script>
|
|
|
|
<!-- unpkg -->
|
|
<script src="https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js"></script>
|
|
```
|
|
|
|
然后你可以通过 `window.artplayerPluginHlsQuality` 访问到插件函数
|