vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.

Home Page:https://vidstack.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An error occurs in player if used with vimeo video and private key, via query parameter.

SobeitB opened this issue · comments

Current Behavior:

An error occurs in player if used with vimeo video and private key, via query parameter.

Expected Behavior:

Display vimeo video without error

Steps To Reproduce:

Environment:

Problem Solution

As I understand the error occurs because the query in the getVimeoVideoInfo function is not executed, because the hash is not passed as a query parameter, for example:
Without hash error:
https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/903483828
With hash without error:
https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/903483828?h=60401222e9.

In the function getVimeoVideoInfo it is necessary to pass hash and then to oembedSrc:
const oembedSrc = https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/${videoId}${hash ? ?h=${hash} : ''};