mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 12:46:15 -08:00
重写测试用例
This commit is contained in:
1 parent
50f51e413b
commit
cd89e8afd8
8 files changed
+9
-1477
No files matched your search
@@ -54,7 +54,7 @@ Specify the format for the `url`, use with `customType`
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.flv',
|
||||
url: '/assets/sample/video.flv',
|
||||
type: 'flv',
|
||||
});
|
||||
```
|
||||
@@ -71,7 +71,7 @@ Customize when loading third-party libraries
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.flv',
|
||||
url: '/assets/sample/video.flv',
|
||||
type: 'flv',
|
||||
customType: {
|
||||
flv: function (video, url, art) {
|
||||
@@ -815,12 +815,13 @@ Custom layer, The type of layer is an object or function
|
||||
[Run Code](/Configuration.layers)
|
||||
|
||||
```js
|
||||
var layer = '/assets/sample/layer.png';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
layers: [
|
||||
{
|
||||
html: `<img style="width: 100px" src="/assets/sample/layer.png">`,
|
||||
html: `<img style="width: 100px" src="${layer}">`,
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '20px',
|
||||
|
||||
@@ -243,8 +243,9 @@ var art = new Artplayer({
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
var layer = '/assets/sample/layer.png';
|
||||
art.layers.add({
|
||||
html: `<img style="width: 100px" src="/assets/sample/layer.png">`,
|
||||
html: `<img style="width: 100px" src="${layer}">`,
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '20px',
|
||||
|
||||
Reference in new issue
Block a user