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:
Harvey Zack committed 2023-11-26 10:30:24 +08:00
1 parent 73fb04737a
commit bbbeca6e4c
21 files changed
+931 -327

No files matched your search

@@ -1,19 +1,19 @@
# Contextmenu
# 右键菜单
## 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 |
| 属性 | 类型 | 描述 |
| --------- | ------------------- | -------------------------- |
| `disable` | `Boolean` | 是否禁用组件 |
| `name` | `String` | 组件唯一名称,用于标记类名 |
| `index` | `Number` | 组件索引,用于显示的优先级 |
| `html` | `String`, `Element` | 组件的 DOM 元素 |
| `style` | `Object` | 组件样式对象 |
| `click` | `Function` | 组件点击事件 |
| `mounted` | `Function` | 组件挂载后触发 |
| `tooltip` | `String` | 组件的提示文本 |
## Init
## 创建
<div className="run-code">▶ Run Code</div>
@@ -39,7 +39,7 @@ art.contextmenu.show = true;
console.info(art.contextmenu['your-menu']);
```
## Add
## 添加
<div className="run-code">▶ Run Code</div>
@@ -64,7 +64,7 @@ art.contextmenu.show = true;
console.info(art.contextmenu['your-menu']);
```
## Remove
## 删除
<div className="run-code">▶ Run Code</div>
@@ -94,7 +94,7 @@ art.on('ready', () => {
});
```
## Update
## 更新
<div className="run-code">▶ Run Code</div>
@@ -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>
@@ -1,19 +1,19 @@
# Layers
# 业务层
## 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 |
| 属性 | 类型 | 描述 |
| --------- | ------------------- | -------------------------- |
| `disable` | `Boolean` | 是否禁用组件 |
| `name` | `String` | 组件唯一名称,用于标记类名 |
| `index` | `Number` | 组件索引,用于显示的优先级 |
| `html` | `String`, `Element` | 组件的 DOM 元素 |
| `style` | `Object` | 组件样式对象 |
| `click` | `Function` | 组件点击事件 |
| `mounted` | `Function` | 组件挂载后触发 |
| `tooltip` | `String` | 组件的提示文本 |
## Init
## 创建
<div className="run-code">▶ Run Code</div>
@@ -46,7 +46,7 @@ var art = new Artplayer({
console.info(art.layers['potser']);
```
## Add
## 添加
<div className="run-code">▶ Run Code</div>
@@ -78,7 +78,7 @@ art.layers.add({
console.info(art.layers['potser']);
```
## Remove
## 删除
<div className="run-code">▶ Run Code</div>
@@ -108,7 +108,7 @@ art.on('ready', () => {
});
```
## Update
## 更新
<div className="run-code">▶ Run Code</div>
@@ -1,8 +1,8 @@
# Setting
# 设置面板
## Build-in
## 内置
You must open the settings panel first, and then come with four built-in items:`flip`, `playbackRate`, `aspectRatio`, `subtitleOffset`
须先打开设置面板,然后自带四个内置项:`flip`, `playbackRate`, `aspectRatio`, `subtitleOffset`
<div className="run-code">▶ Run Code</div>
@@ -19,16 +19,16 @@ var art = new Artplayer({
```
## Init - Select list
## 创建 - 选择列表
| Property | Type | Describe |
| ---------- | ------------------- | ------------------- |
| `html` | `String`, `Element` | Element DOM |
| `icon` | `String`, `Element` | Element icon |
| `selector` | `Array` | Element list |
| `onSelect` | `Function` | Element click event |
| `width` | `Number` | List width |
| `tooltip` | `String` | Prompt text |
| 属性 | 类型 | 描述 |
| ---------- | ------------------- | ------------ |
| `html` | `String`, `Element` | 元素的 DOM |
| `icon` | `String`, `Element` | 元素的图标 |
| `selector` | `Array` | 元素列表 |
| `onSelect` | `Function` | 元素点击事件 |
| `width` | `Number` | 列表宽度 |
| `tooltip` | `String` | 提示文本 |
<div className="run-code">▶ Run Code</div>
@@ -88,7 +88,7 @@ var art = new Artplayer({
});
```
## Init - list nesting
## 创建 - 列表嵌套
<div className="run-code">▶ Run Code</div>
@@ -139,15 +139,15 @@ var art = new Artplayer({
});
```
## Init - Switch button
## 创建 - 切换按钮
| Property | Type | Describe |
| ---------- | ------------------- | -------------------- |
| `html` | `String`, `Element` | Element DOM |
| `icon` | `String`, `Element` | Element icon |
| `switch` | `Boolean` | Button default state |
| `onSwitch` | `Function` | Button toggle event |
| `tooltip` | `String` | Prompt text |
| 属性 | 类型 | 描述 |
| ---------- | ------------------- | --------------- |
| `html` | `String`, `Element` | 元素的 DOM 元素 |
| `icon` | `String`, `Element` | 元素的图标 |
| `switch` | `Boolean` | 按钮默认状态 |
| `onSwitch` | `Function` | 按钮切换事件 |
| `tooltip` | `String` | 提示文本 |
<div className="run-code">▶ Run Code</div>
@@ -174,16 +174,16 @@ var art = new Artplayer({
});
```
## Init - Range slider
## 创建 - 范围滑块
| Property | Type | Describe |
| ---------- | ------------------- | ------------------------- |
| `html` | `String`, `Element` | Element DOM |
| `icon` | `String`, `Element` | Element icon |
| `range` | `Array` | Default state array |
| `onRange` | `Function` | Event fired on completion |
| `onChange` | `Function` | Event fired on change |
| `tooltip` | `String` | Prompt text |
| 属性 | 类型 | 描述 |
| ---------- | ------------------- | ---------------- |
| `html` | `String`, `Element` | 元素的 DOM 元素 |
| `icon` | `String`, `Element` | 元素的图标 |
| `range` | `Array` | 默认状态数组 |
| `onRange` | `Function` | 完成时触发的事件 |
| `onChange` | `Function` | 变化时触发的事件 |
| `tooltip` | `String` | 提示文本 |
```js
const range = [5, 1, 10, 1];
@@ -215,7 +215,7 @@ var art = new Artplayer({
});
```
## Add
## 添加
<div className="run-code">▶ Run Code</div>
@@ -236,7 +236,7 @@ art.setting.add({
});
```
## Remove
## 删除
<div className="run-code">▶ Run Code</div>
@@ -267,7 +267,7 @@ art.on('ready', () => {
});
```
## Update
## 更新
<div className="run-code">▶ Run Code</div>