Player.js: Playback rate changing is not working

Created on 31 Jul 2019  路  19Comments  路  Source: vimeo/player.js

Expected Behavior

Should be able to set playback rate when controls are disabled.

Actual Behavior

setPlaybackRate rejects when main controls are disabled.

Steps to Reproduce

I'm setting the embed options into { speed: true, controls: false }, then I'm calling player.setPlaybackRate(0.5) and promise rejects with the message "Error: Setting the playback rate is not enabled for this video.".
We have a business account and this issue really annoying us :(
Hope you will fix it soon.

enhancement help wanted

Most helpful comment

@luwes

It's fine now!

thanks!

All 19 comments

Thanks for your report! I agree, this seems like a annoying issue - we will reivew this internally and get back to you as soon as possible with a solution.

It also happens when the player is in background mode: { speed: true, background: true }

Thanks for your report! I agree, this seems like a annoying issue - we will reivew this internally and get back to you as soon as possible with a solution.

Hi there, do you have any progress regarding this issue?

@ivoneug, sorry for the lack of updates here, but we have a PR for a fix that should be going out soon. Most likely tomorrow!

Hey @steve52, any updates on this?

@ivoneug are you sure this is not working?
seems to be working on my end, https://codepen.io/luwes/pen/JjdReLG

it's probably because speed is not enabled in the embed settings.

Screen Shot 2020-02-20 at 1 38 55 PM

thinking about it, I agree it's a bit confusing. needing it to be enabled in 2 places.

You can only enable speed controls on the pro account anyway :-(

The error is caught in Chrome but in Firefox it crashes my whole Gatsby app in development mode.

We also hit this issue. We would like to be able to call setPlaybackRate using Player API for videos with Playback controls hidden in Embed settings.

When I call setPlaybackRate with controls disabled I get this error:

Setting the playback rate is not enabled for this video.

I have set speed: true when creating the embed. Could you please look into this? We have Vimeo Premium account.

@vojtad Could you provide a link or example code we could take a look at the replicates your issue?

Unfortunately I can't. I've managed to work around this just a couple of hours ago. Here are the steps I took, hopefully it will help you identify the issue:

  1. I went to Embed preset settings (at https://vimeo.com/settings/videos/embed_presets/<preset id>) and check Show play bar, check Speed control and then uncheck Show play bar.
  2. Then I checked * Also apply to all existing videos* and saved changes.

After some time changing playback rate for all videos started working. I guess it took some time to apply new settings to all our videos.

It looks like Speed control affects the videos even when it is hidden because of unchecked Show play bar.

Here is a screenshot form before when it didn't work:
before

Here is a screenshot for video where it works now:
now

Notice the Speed controls checkbox being in a different state although it is disabled.

@vojtad I beleive the issue you were encountering is fixed. Could you please test again when you have a moment?

I'm getting this issue again @fisherinnovation. Can't set playbackSpeed via the API.

@wesbos Me too. Our platform start to get this response from API today.

Something has changed?

thanks for the feedback, today Vimeo launched speed controls for everyone so there's probably something that was missed. Sorry for the inconvenience. is this a straight iframe embed or via a DIV javascript embed?

The api demo uses the iframe embed and still works
https://player.vimeo.com/api/demo

So I think it must be something with the oEmbed api then. We'll look into this very soon. Keep you posted.

I'm using it through a div:

 <script src="https://player.vimeo.com/api/player.js"></script>
 // ... 
<div id="videoPlayer" data-vimeo-defer data-vimeo-autoplay="true" data-vimeo-autopause="true" data-vimeo-url="@VideoUrl"></div>

The video itself not showing any control to change speed:
image

Although this option used to be there, there is another control at page where our users are able to control theses settings. Then this custom controls are using vimeo API:

    var player = new Vimeo.Player('videoPlayer');
    player.ready().then(function () {
        player.setPlaybackRate(localStorage.getItem('playerSpeed'));
    });

    $('#videoSpeed').on('change', function () {

        player.setPlaybackRate(this.value);
        localStorage.setItem('playerSpeed', this.value);
    });

But when it occur the error described at this issue happens:

image

(Error: Setting the playback rate is not enabled for this video)

@luwes Thanks, I'm using a div to embed my videos as well.

this should be resolved, can you confirm all is working on your end? thanks!

@luwes

It's fine now!

thanks!

Thanks for the quick feedback everyone!

Was this page helpful?
0 / 5 - 0 ratings