Giter VIP home page Giter VIP logo

Comments (12)

zhangxin92 avatar zhangxin92 commented on August 22, 2024 1

Chrome calculates MEI score for sites. policy autoplay When MEI is high enough, media playback without muted is allowed to autoplay on desktop only. Maybe the official site of xgplayer in your Chrome gets a high MEI.
The autoplay MEI computation method of Chrome is inexplicit for users, so we suggest that you should give up the plan that autoplay without muted.

from xgplayer.

zhangxin92 avatar zhangxin92 commented on August 22, 2024

In Chrome, muted autoplay is always allowed. See the policy. So autoplay is available in xgplayer with config "volume: 0".

from xgplayer.

zhangxin92 avatar zhangxin92 commented on August 22, 2024

Another article.

from xgplayer.

zhangzs000 avatar zhangzs000 commented on August 22, 2024

In my project my video still cant auto play at chrome 68.0.3440.84 on macOS High Sierra, i suspect It be effected the warning message:

Failed to load http://img-test.aixuexi.com/B:1005:K/1532448000/0caeb04be45a4447b9896015eb1bf02c.mp4: Request header field Range is not allowed by Access-Control-Allow-Headers in preflight response.

i add the config: ### crossOrigin: true
it still has warning.
i dont know why?

official demo can auto play. it url: http://h5player.bytedance.com/examples/

from xgplayer.

zhangxin92 avatar zhangxin92 commented on August 22, 2024

@zhangzs000 If you are trying to use xgplayer with xgplayer-mp4 plugin, your video server should support range request. With range request, the warning will not happen again.
The config "crossOrigin: true" is unnecessary.

from xgplayer.

zhangzs000 avatar zhangzs000 commented on August 22, 2024

operating environment:

mac
chrome 68.0.3440.84(正式版本) (64 位)

i remove the the plugin xgplayer-mp4, no warning "Request header field Range is not allowed by Access-Control-Allow-Headers in preflight response." in chrome now. but it still cant auto play.

so i suspect the reason is asynchronous request then i change the ajax to synchronization,It still cant auto play.

now i dont know why it cant auto play on chrome?

i use xgplayer "version": "1.0.5" in vue project

from xgplayer.

zhangxin92 avatar zhangxin92 commented on August 22, 2024

@zhangzs000 Did you config "volume: 0"?

from xgplayer.

zhangzs000 avatar zhangzs000 commented on August 22, 2024

it can auto play on firefox and 360 browser,but in chrom
config volume: 0 also didnt work.
config muted: true, also didt work.

I am sad ..... T_T......PM demand it can autoplay on chrome.

from xgplayer.

zhangxin92 avatar zhangxin92 commented on August 22, 2024

Muted autoplay in Chrome is supported by a30892. You can try with the branch now or wait for v1.0.8 as soon as possible.

from xgplayer.

zhangzs000 avatar zhangzs000 commented on August 22, 2024

wa, you are great. Why can official examples auto play in chrome?
official examples:
http://h5player.bytedance.com/examples/
but it cant autoplay in my project.

from xgplayer.

zhangxin92 avatar zhangxin92 commented on August 22, 2024

See your MEI in chrome://media-engagement/

from xgplayer.

SuperChrisliu avatar SuperChrisliu commented on August 22, 2024

@zhangxin92 **Chrome calculates MEI score for sites. policy autoplay When MEI is high enough, media playback without muted is allowed to autoplay on desktop only.**
原来如此....

from xgplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.