Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use vimeo API to play vimeo hosted video files. #597

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/players/Vimeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import createSinglePlayer from '../singlePlayer'
const SDK_URL = 'https://player.vimeo.com/api/player.js'
const SDK_GLOBAL = 'Vimeo'
const MATCH_URL = /vimeo\.com\/.+/
const MATCH_FILE_URL = /vimeo\.com\/external\/.+\.mp4/
const MATCH_FILE_URL = /vimeo\.com\/external\/.+\.[mp4|m3u]/
rin marked this conversation as resolved.
Show resolved Hide resolved

export class Vimeo extends Component {
static displayName = 'Vimeo'
Expand Down
5 changes: 5 additions & 0 deletions test/players/Vimeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const TEST_CONFIG = {
}
}

test('canPlay', t => {
t.false(Vimeo.canPlay('https://player.vimeo.com/external/268931179.m3u8?s=4d7bec5817b90f9227891dd828e32deb91fa01e7'))
t.false(Vimeo.canPlay('https://player.vimeo.com/external/134290208.sd.mp4?s=9000cee9e39cb10a907c297ec36bcde452dfb9e5'))
})

testPlayerMethods(Vimeo, {
play: 'play',
pause: 'pause',
Expand Down