Skip to content

Commit

Permalink
fix: 🐛 修复Vivo playsinline失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
gemxx committed Dec 23, 2024
1 parent 30cb962 commit 253a930
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/xgplayer/src/mediaProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,11 @@ class MediaProxy extends EventEmitter {
this.media.autoplay = true
}

// Warning:一些移动端浏览器(Like Vivo)需要直接设置JS属性,否则会导致失效
if (options.playsinline) {
this.media.playsinline = true
}

/**
* @private
*/
Expand Down

0 comments on commit 253a930

Please sign in to comment.