fix(vimeo): Prevent problem when calling vimeo's player getPlaybackRate

This commit is contained in:
Lucas Fialho Zawacki 2021-09-29 19:45:01 +00:00
parent c7927dbfed
commit 39bddd4cbb

View File

@ -312,8 +312,9 @@ class VideoPlayer extends Component {
getCurrentPlaybackRate() {
const intPlayer = this.player && this.player.getInternalPlayer();
const rate = (intPlayer && intPlayer.getPlaybackRate && intPlayer.getPlaybackRate());
return (intPlayer && intPlayer.getPlaybackRate && intPlayer.getPlaybackRate()) || 1;
return typeof(rate) == 'number' ? rate : 1;
}
setPlaybackRate(rate) {