mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 12:01:20 -08:00
docs update
This commit is contained in:
1 parent
00f3b410a4
commit
15a58a563e
1 file changed
+78
-4
+78
-4
@@ -1275,7 +1275,7 @@ var art = new Artplayer({
|
|||||||
});
|
});
|
||||||
|
|
||||||
art.on('firstCanplay', () => {
|
art.on('firstCanplay', () => {
|
||||||
art.player.flip('horizontal);
|
art.player.flip('horizontal');
|
||||||
console.log(art.player.flipState);
|
console.log(art.player.flipState);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@@ -1296,7 +1296,7 @@ var art = new Artplayer({
|
|||||||
});
|
});
|
||||||
|
|
||||||
art.on('firstCanplay', () => {
|
art.on('firstCanplay', () => {
|
||||||
art.player.flip('horizontal);
|
art.player.flip('horizontal');
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
art.player.flipRemove();
|
art.player.flipRemove();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -1812,13 +1812,87 @@ art.on('firstCanplay', () => {
|
|||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
> TODO...
|
### get
|
||||||
|
|
||||||
|
- Type: `Function`
|
||||||
|
|
||||||
|
Get the storage
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://blog.zhw-island.com/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(art.storage.get('volume'));
|
||||||
|
```
|
||||||
|
|
||||||
|
### set
|
||||||
|
|
||||||
|
- Type: `Function`
|
||||||
|
|
||||||
|
Set the storage
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://blog.zhw-island.com/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
});
|
||||||
|
|
||||||
|
art.storage.set('volume', 0.7);
|
||||||
|
```
|
||||||
|
|
||||||
## i18n
|
## i18n
|
||||||
|
|
||||||
- Type: `Object`
|
- Type: `Object`
|
||||||
|
|
||||||
> TODO...
|
### get
|
||||||
|
|
||||||
|
- Type: `Function`
|
||||||
|
|
||||||
|
Get the a i18n value
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://blog.zhw-island.com/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(art.i18n.get('Play'));
|
||||||
|
```
|
||||||
|
|
||||||
|
### update
|
||||||
|
|
||||||
|
- Type: `Function`
|
||||||
|
|
||||||
|
Update the i18n
|
||||||
|
|
||||||
|
[Run Code](/)
|
||||||
|
|
||||||
|
```js
|
||||||
|
var url = 'https://blog.zhw-island.com/assets-cdn';
|
||||||
|
var art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||||
|
});
|
||||||
|
|
||||||
|
art.i18n.update({
|
||||||
|
'zh-cn': {
|
||||||
|
'More': '更多'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(art.i18n.get('More'));
|
||||||
|
```
|
||||||
|
|
||||||
## notice
|
## notice
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user