cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
9.41k stars 1.15k forks source link

(ViemoPlayer) Error: Setting the playback rate is not enabled for this video. #700

Closed he4amm closed 5 years ago

he4amm commented 5 years ago

Current Behavior

I'm trying to load a Vimeo video into ViemoPlayer, and after page loads and video start playing the error below show in console

Uncaught (in promise) Error: Setting the playback rate is not enabled for this video.
    at player.js:2
    at Array.forEach (<anonymous>)
    at b (player.js:2)
    at e (player.js:2)
    at sentryWrapped (helpers.js:74)

Expected Behavior

if the video is not able to set a playback rate, should be a handler for this in the player to prevent that, and prevent this issue from performing, or just can issue fixed internally if video doesn't support setting a playback rate

Environment

import React, { Component } from 'react';
import VimeoPlayer from 'react-player/lib/players/Vimeo';

class VideoThumbnail extends Component {
  render() {
   const { videoUrl } = this.props;

    return (
              <VimeoPlayer
                url={videoUrl}
                width="100%"
                height="100%"
                playing={true}
                playsinline
                muted
              />
    );
  }
}

export default VideoThumbnail;
cookpete commented 5 years ago

What version of ReactPlayer are you using? This should be fixed by https://github.com/CookPete/react-player/commit/2b59631fedc9acbb9ce685d28b04a8125b60071a which was published in 1.12.0

he4amm commented 5 years ago

I use 1.11.2, will upgrade to 1.12.0 and check it

he4amm commented 5 years ago

Yes, this issue has been fixed in version 1.12.0, thank you :)