On iPhone, Vimeo Javascript API .play() function doesn't work until the video has been played

前端 未结 3 1962
死守一世寂寞
死守一世寂寞 2021-01-05 14:50

I\'m using SwipeView (http://cubiq.org/swipeview) to create a swipeable slideshow on touchscreen devices. This is simple enough with images, but I want to include a Vimeo vi

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-05 15:20

    After investigating this further and finding two other StackOverflow questions with the same issue (video players with js API and iPhones and video players with js API and iPhones) as well as the fact that this same behavior occurs on Vimeo's official API playground, it seems that either it's either a feature by design or a bug with the API.

    Theorizing: Apple doesn't allow you to autoplay videos in mobile Safari. Perhaps this limitation is being imposed on Apple's end to prevent you from using the API to autoplay a video with Javascript.

提交回复
热议问题