Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add autoplay deprecation note to README #356

Merged
merged 3 commits into from
Mar 26, 2018
Merged

Conversation

ldayananda
Copy link
Contributor

No description provided.

README.md Outdated
@@ -120,6 +120,10 @@ The following events are slated for removal from contrib-ads and will have no sp
* `adscanceled` (EVENT) -- In the future, this event will no longer result in special behavior in contrib-ads. It was intended to cancel all ads, but it was never fully implemented. Instead, trigger `nopreroll` and `nopostroll`.
* `adserror` (EVENT) -- In the future, this event will no longer result in special behavior in contrib-ads. Today, this event skips prerolls when seen before a preroll ad break. It skips postrolls if seen after contentended and before a postroll ad break. It ends linear ad mode if seen during an ad break. These behaviors should be replaced using `skipLinearAdMode` and `endLinearAdMode` in the ad integration.

## Autoplay

Using the `autoplay` attribute on the video element is not supported. Due to Autoplay Restrictions [introduced](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes) by [browsers](https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/), using the `autoplay` attribute on the player will often not behave as expected. The recommended [best practice](https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#best-practices) is to use the `player.play()` method to autoplay when autoplay without user interaction is not restricted and have access to the [play promise](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play) if it is available on that browser.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the webkit.org link maybe say "by browsers such as [Safari]" so it's clear the link is about Safari.

@incompl
Copy link
Contributor

incompl commented Mar 26, 2018

Looks good to me overall

@ldayananda ldayananda changed the title [WIP] add autoplay deprecation note to README docs: add autoplay deprecation note to README Mar 26, 2018
@ldayananda ldayananda merged commit bf82f40 into master Mar 26, 2018
@ldayananda ldayananda deleted the autoplay-note branch March 26, 2018 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants