Skip to content

Commit

Permalink
Do not use vimeo API to play vimeo hosted video files.
Browse files Browse the repository at this point in the history
  • Loading branch information
rin committed Mar 15, 2019
1 parent 37700cc commit 18cc786
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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]/

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

0 comments on commit 18cc786

Please sign in to comment.