-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Expected Behavior
Vimeo player loads consistently on iOS
Actual Behavior
Our website is having intermittent issues loading videos, only on iOS Safari. Reloading the page a few times, there is an error that occurs inconsistently on videos
InvalidStateError: The object is in an invalid state.
which links to https://f.vimeocdn.com/p/4.40.53/js/vendor.module.js (L7239 when expanded in safari devtools) in a method n._onMSSourceOpen
.
We instantiate each new Vimeo
with an options object that includes prefer_mms: false
, per #1059 and this project's README, but debugging and breakpointing the remote script, eg. on L8214 (when expanded in safari devtools), it appears that this._options.disableMMS: false
during the lifecycle of the video? Inspecting the network traffic, we do send out a url that includes the prefer_mms=false
:
https://vimeo.com/api/oembed.json?url=https%3A%2F%2Fvimeo.com%2F1061367376%2F272c2eeb84&url=https%3A%2F%2Fvimeo.com%2F1061367376%2F272c2eeb84&muted=true&background=true&playsInline=true&controls=false&byline=false&dnt=true&loop=true&prefer_mms=false&title=false&portrait=false&quality=auto&autopause=false
but noting that it is not reflected in the response's iframe src:
"html": "<iframe src=\"https:\/\/player.vimeo.com\/video\/1061367376?h=272c2eeb84&title=0&byline=0&portrait=0&muted=1&autopause=0&controls=0&dnt=1&loop=1&background=1&quality=auto&app_id=122963\" width=\"426\" height=\"240\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media\" title=\"WolffOlins_BenefitCosmetics_01\"><\/iframe>",
We're using version 2.26.0
of player.js.
Steps to Reproduce
Here's a (fairly) minimal reproduction case