-
Do you currently have a way to detect if a user is on power saving mode on iOS? (and therefore autoplay would fail) I found these
But wondering if there is a cleaner solution? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey Pietro! The way we handle autoplay in the library is that we call |
Beta Was this translation helpful? Give feedback.
Hey Pietro!
The way we handle autoplay in the library is that we call
play()
manually and look for an error to be thrown to detect failure. We don't rely on the nativeautoplay
attribute, which I believe is the same for most modern player libraries. We call theonAutoplayFail
callback in React and apply thedata-autoplay-error
attribute to the player element for styling purposes. Some more information available in our API > Autoplay page.