From 18cc786556ccbe9917696c85e46053e3ba70e5c7 Mon Sep 17 00:00:00 2001 From: Rin Date: Fri, 15 Mar 2019 15:43:29 +0100 Subject: [PATCH] Do not use vimeo API to play vimeo hosted video files. --- src/players/Vimeo.js | 2 +- test/players/Vimeo.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/players/Vimeo.js b/src/players/Vimeo.js index 16837653..4538a98d 100644 --- a/src/players/Vimeo.js +++ b/src/players/Vimeo.js @@ -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' diff --git a/test/players/Vimeo.js b/test/players/Vimeo.js index 2c5dd1eb..ad22d653 100644 --- a/test/players/Vimeo.js +++ b/test/players/Vimeo.js @@ -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',