This leads to unexpected video playback and throws an error in Safari, where Safari blocks autoplay.
To Reproduce
Steps to reproduce the behavior:
Clone master branch
Set autoplay to false
Put console.logs in can-autoplay library
Expected behavior
Ultimately, .init should not playback video if autoplay is set to false.
In calculating getEnv object, can-autoplay should not playback the video.
Screenshots
Desktop (please complete the following information):
Describe the bug When calculating the property
canAutoplay
ofenv
, thecan-autoplay
library from https://github.com/matvp91/indigo-player/blob/7749c063194a31818aeb92f88844d97248b77bf8/src/utils/getEnv.ts#L4 starts the player in functionstartPlayback
, even ifconfig.autoplay
is set to false. The reason is,getEnv
is run oninit
and starts the video player.This leads to unexpected video playback and throws an error in Safari, where Safari blocks autoplay.
To Reproduce Steps to reproduce the behavior:
Expected behavior Ultimately,
.init
should not playback video ifautoplay
is set to false. In calculatinggetEnv
object, can-autoplay should not playback the video.Screenshots
Desktop (please complete the following information):