Skip to content

iOS videos intermittently not loading #1075

@danielgamage

Description

@danielgamage

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&amp;title=0&amp;byline=0&amp;portrait=0&amp;muted=1&amp;autopause=0&amp;controls=0&amp;dnt=1&amp;loop=1&amp;background=1&amp;quality=auto&amp;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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions