Skip to content

Commit

Permalink
fix(xgplayer): support config volume:0 in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangxin92 committed Oct 19, 2021
1 parent 3e10cfe commit ed0b775
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/xgplayer/browser/core_player.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/xgplayer/browser/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/browser/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/browser/simple_player.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/dist/core_player.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/xgplayer/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/dist/simple_player.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/es/core_player.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/xgplayer/es/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/es/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/es/simple_player.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/xgplayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xgplayer",
"version": "2.31.0",
"version": "2.31.1",
"description": "video player",
"main": "./dist/index.js",
"typings": "./types/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions packages/xgplayer/src/controls/volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ let volume = function () {
bar = container.querySelector('.xgplayer-bar')
selected = container.querySelector('.xgplayer-drag')
if (sniffer.device === 'mobile') {
if(player.volume === 0) {
player.video.muted = true
}
onVolumeChange()
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/xgplayer/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2.31.0"
"version": "2.31.1"
}

0 comments on commit ed0b775

Please sign in to comment.