From 90139eefaa1413c2ee62e0d58376fc879b73ad9a Mon Sep 17 00:00:00 2001 From: Anhang Zhu Date: Thu, 2 Nov 2017 16:04:59 -0700 Subject: [PATCH] Support new Twitch URLs --- src/players/Twitch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/players/Twitch.js b/src/players/Twitch.js index 6db3f851..5ac46904 100644 --- a/src/players/Twitch.js +++ b/src/players/Twitch.js @@ -4,8 +4,8 @@ import { callPlayer, getSDK, randomString } from '../utils' const SDK_URL = '//player.twitch.tv/js/embed/v1.js' const SDK_GLOBAL = 'Twitch' -const MATCH_VIDEO_URL = /^(?:https?:\/\/)?(?:www\.)twitch\.tv\/videos\/(\d+)($|\?)/ -const MATCH_CHANNEL_URL = /^(?:https?:\/\/)?(?:www\.)twitch\.tv\/([a-z0-9_]+)($|\?)/ +const MATCH_VIDEO_URL = /^(?:https?:\/\/)?(?:www\.)|(?:go\.)twitch\.tv\/videos\/(\d+)($|\?)/ +const MATCH_CHANNEL_URL = /^(?:https?:\/\/)?(?:www\.)|(?:go\.)twitch\.tv\/([a-z0-9_]+)($|\?)/ const PLAYER_ID_PREFIX = 'twitch-player-' export default class Twitch extends Component {