Vimeo не работает autoplay

Autoplaying and looping embedded videos

If you’d like your embedded video to autoplay or loop, go to the video’s page on vimeo.com and click the » Share» button in the upper right corner of the video player. In the window that opens, click the «Show options» link, and check the corresponding boxes next to «Loop this video,» «Autoplay this video,» or both. You can then copy the embed code. (Note: this method is currently only an option for Public or Password-Protected videos. Read on for alternative steps if your video is private.)

You can also do this manually by adding the following parameters into your embed code:

If you have more than one video autoplaying on a particular page, you will also need to include this parameter:

So, for example, if you were embedding two autoplay, looping, videos on a page, the embed code for each would look like this:

Important: If your video is set to the Private privacy setting, additional parameters must be added after the privacy hash parameter. This will appear directly after the video ID in the URL and looks similar to ?h=913062c8ff . Every parameter after the hash​ can be added using & rather than ?.

Autoplay Restrictions

If the autoplay parameter is present, our player will attempt to automatically begin playback. However, please note that some browsers specifically block autoplay. In these cases, your video will revert back to the original thumbnail and controls, requiring viewers to select play to start playback.

Autoplay is currently restricted in the following environments:

Safari version 11+ (Desktop)

Documentation: https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/
Policy: Autoplaying videos must be muted. Viewers can choose to block or allow unmuted autoplay for specific domains on their setup (see here)

Chrome version 66+ (Desktop/Mobile)

Documentation: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Policy: Autoplaying videos must be muted. Videos that are frequently visited by the viewer are permitted to autoplay with sound (based on Google’s scoring system)

iOS (Safari, other mobile browsers, apps)

Documentation: https://webkit.org/blog/6784/new-video-policies-for-ios/
Policy: Autoplaying videos must be muted.
Device: Autoplay is disabled when the iPhone or iPad is in Low Power Mode.

Firefox 66+ (Desktop/Mobile)

Documentation: https://support.mozilla.org/en-US/kb/block-autoplay
Policy: Firefox now blocks videos with sound from playing automatically. This change is being gradually rolled out to users in Quantum version 66. Viewers can choose to block or allow unmuted autoplay for specific domains on their setup

Workarounds

There is no way to stop these autoplay restrictions; however, you can mute your video to ensure autoplay is always honored. Just add one of the following parameters to the end of the player URL in your embed code:

Читайте также:  Как папе получить декретные если мама не работает

?background=1 : This parameter automatically disables all elements in the player (play bar, buttons, etc), autoplays, loops, and mutes your video on load. Please note: the background parameter is only supported for videos hosted by paid members. Learn more here.

?muted=1 This parameter will automatically mute your video on load. Once your video plays, viewers can manually un-mute by clicking on the volume bar within the player.

💡Important: Both of these parameters will force your video to load as muted in all browsers. Videos without audio tracks (or audio tracks without sound) will not be considered muted by browsers. In order to bypass autoplay restrictions, you must use one of the embed parameters above.

If you are experiencing an issue, or have any questions, please contact us .

Источник

Vimeo video autoplay не работает в Safari 11: NotAllowedError

С момента последнего обновления Safari до версии 11 некоторые видео перестали работать. Хуже всего то, что иногда, например, один раз в пять попыток, это работает. Я думал, что причина в моем JS-скрипте, который интегрирует Vimeo Player API, но в конечном итоге даже ссылка для вставки Vimeo не работает вообще.

Итак, когда вы открываете встроенное видео в Safari 11, оно не запускается и полностью блокируется. Вы можете увидеть его, открыв т. е. https://player.vimeo.com/video/XXXXXXXX?autoplay=1

в журнале консоли вы можете получить что-то вроде:

Unhandled Promise Rejection: NotAllowedError (DOM Exception 35): The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

3 ответов

вы можете добавить background param в URL-адрес iframe и src :

если ваше видео имеет звук, который вы также можете экспортировать видео без звуковой дорожки вообще. Чем вам, вероятно, не нужно background param вообще.

загвоздка в том, что Safari 11 блокирует все видео автозапуск, если в нем есть звук.

даже когда видео, как в моем случае, не имеет уровня звука, но экспортируется со звуком без объем. Вы можете увидеть значок sovolume в адресной строке:

потому что safari не позволяет автоматически воспроизводить все видео. вы можете добавить mousemove прослушивателя событий. Когда мышь движется, видео начинает играть. Затем вы должны удалить это событие.

поддержка iOS: автоматическое воспроизведение видео поддерживается с iOS 10+, но требует атрибута playsinline на теге.

Источник

Chrome Vimeo Iframe autoplay not working anymore

since some days my vimeo iframe will not autoplay anymore. I know the chrome update, which will block autoplay videos with sound. Is the block already active?

The Vimeo Example code doesn’t work:

But netflix.com and vimeo itself has an autoplay video on the homepage, which works.

EDIT: Chrome version 66.0.3359.139 macOS High Sierra 10.13.4

Does anyone have an idea or answer?

7 Answers 7

Annotating the with an allow attribute worked for me:

You need to add &muted=1 to the iFrame src path and you need to add the attribute allow=»autoplay» to the iFrame. Now the Vimeo video starts automatically again in Chrome.

yes, according to their documentation it is.

EDIT:

Advance browsers like FireFox, Chrome and Safari are now blocking video autoplay by default.

CHROME Auto-Play Policy:

The Media Engagement Index, or MEI for short, a way of Chrome is to allow AutoPlay audio on your page to be based on your previous interactions with this webpage as a user. You can see what this looks like by going to

MEI is calculated per user profile, and is persisted to incognito mode.

WEBKIT/SAFARI Auto-Play Policy:

FIREFOX Auto-Play Improvements:

NOTE: Don’t assume a media element will play, and don’t show the pause button from the start. Look at the Promise returned by the play function on HTMLMediaElement to see if it was rejected:

Читайте также:  Как починить дверной косяк межкомнатной двери

Autoplay + Mute + Start at time x sec =

#t parameter must be the last one.

Now the autoplay video just works if the audio is muted, you need to add the muted parameter into your api or iframe code &muted=1, you can change your browser preferences to allow autoplay unmuted videos: chrome://flags/#autoplay-policy Change the default option to «No user gesture is required»

If the user clicks the video you can unmuted it!!

If you are paid member and want to use video as a background, this is probably what you need:

?background=1: This parameter automatically disables all elements in the player (play bar, buttons, etc), autoplays, loops, and mutes your video on load. Please note: the background parameter is only supported for videos hosted by paid members. Learn more here.

Or, if you are not:

?muted=1 This parameter will automatically mute your video on load. Once your video plays, viewers can manually un-mute by clicking on the volume bar within the player.

BUT, I still can’t make it work on the phone.

Источник

Vimeo player autoplay feature does not work on mobile devices #199

Comments

gary0033 commented Jan 18, 2018

Vimeo’s code to automatically start a video on the Vimeo player when loaded without having to press the play button is: autoplay=1. However, Vimeo states that this will not work on mobile devices using Vimeo’s player. Autoplay does work on external (third party) players linked to Vimeo.

Two questions: Is there any technological issue that prevents Vimeo from offering an autoplay option on their own embedded player?
Second, is there a way to get the Vimeo player to autoplay on mobile devices? A work around?

The text was updated successfully, but these errors were encountered:

luwes commented Jan 19, 2018 •

I see https://webkit.org/blog/6784/new-video-policies-for-ios/
We will put this in soon, sorry for the delay on this.

gldsgns commented Jan 31, 2018

Hey luwes, just checking. did this change rollout in the past few hours (day)? Was troubleshooting the issue and it suddenly went away without any obvious changes to my site or its code. autoplay is working

luwes commented Feb 6, 2018

strange, it’s actually not in yet @gldsgns 🙂 it’s disabled for most touch devices.

gldsgns commented Feb 6, 2018

Ah, then it must be related to a workaround I inadvertently enabled with the embed. Thanks for the reply.

warmac92 commented Mar 7, 2018

@gldsgns could you please share some information about the workaround. I need to do it for a client’s project. Autoplay works fine on desktop devices but not on mobile devices.

warmac92 commented Mar 7, 2018

@luwes I would be very thankful if you can comment about any updates for this change.

ActonBV commented Mar 20, 2018

@gldsgns can you let me know how you got a vimeo video to autoplay on mobile using Rev Slider?

RiccardoZaffalon commented Mar 23, 2018

Hi @luwes and everyone, anything new about this? It would be very useful to have!
+1

luwes commented Mar 23, 2018

Autoplay on mobile works now if muted is enabled.

smithsmithsmithsmith commented Mar 30, 2018

@luwes I’ve tried everything and it still doesn’t work

I’m currently using: api=1&background=1&muted=1&loop=1&autoplay=1

The only way to get the video to play on mobile is to tap and hold for 2+ seconds. Help!

gldsgns commented Mar 30, 2018

To clarify, it’s not true autoplay- simply the ability for my custom button to play the video without pressing the vimeo play button. This wasn’t working because of the prohibition of autoplay on mobile, but the RevSlider has a setting «No Poster On Mobile» in the Vimeo layer which allows the Vim. Play to be triggered.

Читайте также:  Vaporesso extra не работает

AdrianMrn commented Apr 4, 2018 •

@smithsmithsmithsmith I managed to get it working like this:
HTML:

pat-sullivan commented Apr 10, 2018

@AdrianMrn doesn’t seem to work for me, testing on iPhone6 latest iOS. Might just resort to taking a chunk out of our server’s bandwidth and uploading the video there in a video wrapper.

ar9jun commented Apr 30, 2018

I ran into this issue as well, and not sure if this helps anyone else — but with my player — which has autoplay, background and loop set to true — I ran .setCurrentTime(0) and it played on document ready!

ar9jun commented Apr 30, 2018

@gary0033 So use the Vimeo.Player constructor to create an instance of your player (you can see how in the Getting Started section of the ReadMe and on the player instance (let’s say you called it musicPlayer), you would run musicPlayer.setCurrentTime(0);`.

In my case, I’m using jQuery, so I do the following:

Check out the ReadMe to figure out how to create an instance for your needs.

linuxbastard commented May 22, 2018 •

Has there been any progress on this?
I’m currently on a plus plan and have a video embedded with background and mute set to 1, but still does not autoplay on mobile.

fisherinnovation commented May 22, 2018

@linuxbastard What OS and browser are you encountering your autoplay issues with?

linuxbastard commented May 22, 2018

So far chrome browser on android, and chrome and safari on iOS

fisherinnovation commented May 22, 2018

@linuxbastard the muted param shouldn’t be required on embeds where the background is set as that is done by default when setting background=1 . When testing https://player.vimeo.com/video/76979871?background=1 directly, are you still able to replicate your issue? If so, can you please provide the version of the browser you are testing with?

linuxbastard commented May 22, 2018 •

I only had background=1 before, but that didn’t work so I tested with the muted=1 parameter as well. Same thing. I have Chrome 66.0.3359.158 on Android 7.1.1. Users I tested it with were on iOS on iPhone X and iPhone 8. I can’t check what browser and version they were using tho, I was only informed of the autoplay not working.

TheRealMikeD commented Sep 21, 2018

FWIW, I seem to have found a workaround that worked for me. Thought I would share in case it helps someone else.

For me, the magic ingredient was pre-loading the videos using the Vimeo API (https://github.com/vimeo/player.js#loadvideoid-number-promisenumber-typeerrorpassworderrorerror). Inside of a jQuery document.ready handler, I instantiate a Vimeo.Player object, then call its loadVideo() method on the existing embed iframe, using the same video ID that is already in the embed (might work with other id’s and/or loading new embeds via code also, but I didn’t try that).

Now, in my case, I didn’t want to play the video(s) right away, but rather when a user clicked a button, I wanted them to pop up and play at full screen, which they would not do until I found this solution. If you are looking to have the video play immediately when the page loads, you might try calling the Vimeo Player’s play() method in the promise handler for the loadVideo() method.

Here’s a simplified version of my code:

There are a lot scenarios that I haven’t tested, so I can’t guarantee that this will work for everyone, but I hope that it helps some of you, or at least points you in a helpful direction.

Источник

Оцените статью