This commit is contained in:
zhw2590582 committed 2022-01-07 20:13:44 +08:00
1 parent 9bc87eb0e2
commit b70a804591
54 files changed
+357 -226

No files matched your search

@@ -702,6 +702,72 @@ art.on('ready', () => {
});
```
## attr
- Type: `Function`
- Parameter: `String`
Dynamically get and set the properties of the video element
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('ready', () => {
console.info(art.attr('playsInline'));
art.attr('playsInline', true);
console.info(art.attr('playsInline'));
});
```
## title
- Type: `Setter/Getter`
- Parameter: `String`
Dynamic get and set player title
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('ready', () => {
console.info(art.title);
art.title = 'New Title';
console.info(art.title);
});
```
## theme
- Type: `Setter/Getter`
- Parameter: `String`
Dynamic get and set player theme color
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('ready', () => {
console.info(art.theme);
art.theme = '#000';
console.info(art.theme);
});
```
## destroy
- Type: `Function`