Contents
Kinh Nghiệm Hướng dẫn Video autoplay best practices 2022
You đang tìm kiếm từ khóa Video autoplay best practices được Cập Nhật vào lúc : 2022-12-19 09:07:16 . Với phương châm chia sẻ Mẹo Hướng dẫn trong nội dung bài viết một cách Chi Tiết Mới Nhất. Nếu sau khi tìm hiểu thêm tài liệu vẫn ko hiểu thì hoàn toàn có thể lại phản hồi ở cuối bài để Mình lý giải và hướng dẫn lại nha.
Automatically playing a video or audio on page load is probably one of the annoying things that a website can do to a user. A muted video is still probably okay, but any kind of autoplaying sound comes as more of a surprise to the user!
To deter websites from autoplaying audio and video, browsers have brought out new policies for them. In general, browsers will now block an autoplaying video or audio from playing. In addition, users can set their preferences as to which websites can be allowed to autoplay, and which cannot. Good news for end users, bad news for marketing guys.
Each browser has their own rules for autoplaying truyền thông, but more or less they are the same.
Autoplaying Rules for Google Chrome
- A muted autoplay will be allowed to play.An autoplay with sound is allowed only when the user has done some kind of gesture with the website before click, tap etc.On desktop, an autoplay with sound is also allowed when the the user’s MEI (Media Engagement Index) for the website domain has crossed a certain limit. MEI is an indication that the user has previously played a truyền thông with sound on the website before, so its okay to autoplay the truyền thông in the current case.
Chrome has some rules for calculating the MEI, like the the usage of truyền thông beforehand must be greater than 7 seconds, size of the video played beforehand must be greater than 200×140 px etc.On mobiles, autoplaying with sound will always be allowed if the user has placed the website to their home screen.
You can check the MEI for your visited websites by entering chrome://truyền thông-engagement/ in Chrome’s navigation bar.
The complete list and more information can be found on Autoplay Policy Changes for Google Chrome
Autoplaying Rules for Safari
- If the user had done some kind of interaction like click, touch, keypress then autoplaying is allowed.If the user had not done some kind of interaction, then a muted video or video that has no audio tracks will be allowed to play. If the video gradually plays an audio, the video will be paused.Autoplaying video caused due to the autoplay attribute will play only when they are visible in the viewport. They are paused if they are scrolled out of the viewport.
Autoplaying video caused due to the play() method will keep on playing even if they are scrolled out of the viewport.
The complete set of rules can be found on New
Autoplaying Rules for Firefox
- Muted autoplay is always allowed.Autplaying will never be allowed if no user interaction has been performedAn audible autoplay is allowed if the user has granted camera/microphone permissions
More information on Firefox 66 to block automatically playing audible video and audio.
Best Practices for Allowing Autoplay Media to Work Properly
Autoplaying rules for all browsers are somewhat similar :
- Wait for the user to perform some kind of gesture before autoplaying. For example wait for the user to click somewhere, press a key, or scroll down the page. Then autoplay the truyền thông.Videos can be autoplayed with sound muted. If the user gains interest he can unmute it himself.
The whole point is not to annoy or surprise the user.
How to Know Autoplaying Was Blocked
If autoplay happened due to the play() method :
The Promise returned by the truyền thông element’s play method will throw an exception if autoplaying is blocked. You will then need to show the “Play” button.
var played = document.querySelector(‘#video’).play();
played.then(function()
// autoplay started
).catch(function(error)
// autoplay blocked
// handle blocking : show the play button
);
If autoplay happened due to the set autoplay attribute :
There is no error thrown in this case. The video will just stop playing with proper controls still there and you don’t need to do anything.
Clip Video autoplay best practices ?
Bạn vừa đọc Post Với Một số hướng dẫn một cách rõ ràng hơn về Review Video autoplay best practices tiên tiến và phát triển nhất
Người Hùng đang tìm một số trong những Chia Sẻ Link Down Video autoplay best practices Free.
Giải đáp vướng mắc về Video autoplay best practices
Nếu sau khi đọc nội dung bài viết Video autoplay best practices vẫn chưa hiểu thì hoàn toàn có thể lại Comment ở cuối bài để Mình lý giải và hướng dẫn lại nha
#Video #autoplay #practices