mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
Update HLS, FLV, and DASH player configurations
Update progress bar height in Artplayer Add dynamic layer, controller, menu, and setting item management Update Changelog_CN Update utils.js Update package.json Update built-in management in Artplayer Update i18n documentation Add support for new languages Update language import and modification
This commit is contained in:
1 parent
73fb04737a
commit
bbbeca6e4c
21 files changed
+931
-327
No files matched your search
@@ -1,22 +1,22 @@
|
||||
# Controls
|
||||
# 控制器
|
||||
|
||||
## Config
|
||||
## 配置
|
||||
|
||||
| Property | Type | Describe |
|
||||
| ---------- | ------------------- | ------------------------------------------------------------------------------------ |
|
||||
| `disable` | `Boolean` | Whether to disable the component |
|
||||
| `name` | `String` | Component unique name, used to mark class name |
|
||||
| `index` | `Number` | Component index, used for display priority |
|
||||
| `html` | `String`, `Element` | DOM element of the component |
|
||||
| `style` | `Object` | component style object |
|
||||
| `click` | `Function` | Component click event |
|
||||
| `mounted` | `Function` | Triggered after the component is mounted |
|
||||
| `tooltip` | `String` | Tooltip text for the component |
|
||||
| `position` | `String` | `left` and `right` control the left and right positions where the controller appears |
|
||||
| `selector` | `Array` | Array of objects for the select list |
|
||||
| `onSelect` | `Function` | A function that is triggered when an element of the select list is clicked |
|
||||
| 属性 | 类型 | 描述 |
|
||||
| ---------- | ------------------- | ------------------------------------------ |
|
||||
| `disable` | `Boolean` | 是否禁用组件 |
|
||||
| `name` | `String` | 组件唯一名称,用于标记类名 |
|
||||
| `index` | `Number` | 组件索引,用于显示的优先级 |
|
||||
| `html` | `String`, `Element` | 组件的 DOM 元素 |
|
||||
| `style` | `Object` | 组件样式对象 |
|
||||
| `click` | `Function` | 组件点击事件 |
|
||||
| `mounted` | `Function` | 组件挂载后触发 |
|
||||
| `tooltip` | `String` | 组件的提示文本 |
|
||||
| `position` | `String` | `left` 和 `right` 控制控制器出现的左右位置 |
|
||||
| `selector` | `Array` | 选择列表的对象数组 |
|
||||
| `onSelect` | `Function` | 选择列表的元素被点击时触发的函数 |
|
||||
|
||||
## Init
|
||||
## 创建
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -64,10 +64,10 @@ var art = new Artplayer({
|
||||
|
||||
// Get the Element of control by name
|
||||
console.info(art.controls['your-button']);
|
||||
console.info(art.controls.subtitle);
|
||||
console.info(art.controls['subtitle']);
|
||||
```
|
||||
|
||||
## Add
|
||||
## 添加
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -95,10 +95,10 @@ art.controls.add({
|
||||
});
|
||||
|
||||
// Get the Element of control by name
|
||||
console.info(art.controls.button1);
|
||||
console.info(art.controls['button1']);
|
||||
```
|
||||
|
||||
## Remove
|
||||
## 删除
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -128,7 +128,7 @@ art.on('ready', () => {
|
||||
});
|
||||
```
|
||||
|
||||
## Update
|
||||
## 更新
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user