Closed yashraj-02 closed 1 year ago
in iOS low power mode, video cannot be played unless user interact with the device. we can catch this scenario with 'suspend' event. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/suspend_event
I have tried that. But unfortunately it didn’t work out. Do you have an example code that I can refer to?
@dioramayuanito
if 'signal' event cannot catch the scenario, you can use can-autoplay library to catch 'error' for autoplay-muted mode.
import canAutoPlay from 'can-autoplay';
canAutoPlay
.video({timeout: 100, muted: true})
.then(({result, error}) => {
if(result === false){
console.warn('Error did occur: ', error)
}
})
but still we cannot force autoplay in iOS low power mode.
Hello @yashraj-02 ,
My understanding is that videos are not intended to autoplay in low-power mode. We recommend maintaining this behavior to respect to user's setting of low-power mode.
You can use the suspend
event, mentioned in comment 2, to show a UI for starting the video, since auto-play is not an option in low-power mode.
Thank you, Jackson IMA SDK team
Can we force auto-play of video ads [muted] in IOS low power mode?