player.js icon indicating copy to clipboard operation
player.js copied to clipboard

Cannot determine if background video is compatible

Open lnpbk opened this issue 10 years ago • 4 comments

On a mobile device, a Vimeo video with background mode on does not play, which is great. The trouble is, I cannot see any way to determine if the video will be played or not, using the existing methods/events.

I currently display fallback content, then on the play event hide it. It'd be nicer to determine whether the video is going to play or not, then display the fallback content if required.

lnpbk avatar Jul 13 '16 12:07 lnpbk

That makes a lot of sense. We'll see what we can do if/when background video becomes an officially-supported feature (it's still "experimental" right now).

bdougherty avatar Aug 18 '16 20:08 bdougherty

@lnpbk Could you solve that problem? Now I need to play background video in the mobile device. But background video is not working. error: In chrome mobile, Uncaught (in promise) TypeError: Cannot read property 'on' of undefined at Object. (player.js:formatted:6759) at Object.e.fire (player.js:formatted:513) at player.js:formatted:5240 at

In firefox mobile, TypeError: e.telecine is undefined

Thanks

RoyalFlushever avatar Dec 16 '17 07:12 RoyalFlushever

@RoyalFlushever The error no longer appears (https://github.com/vimeo/player.js/issues/205), however background autoplay on mobile still is not supported yet.

rebecca-sich avatar Feb 16 '18 04:02 rebecca-sich

I don't believe there will be any API methods added to check this behaviour. However this is simply checked by a user agent check for iOS and Android, on these devices background play is disabled.

luwes avatar Mar 02 '18 13:03 luwes