v1.2.0-beta/add youtube support

This commit is contained in:
Ayushya Amitabh
2020-05-19 17:38:47 -04:00
parent 133d4c2b9d
commit 2f082d24b5
6 changed files with 64 additions and 5 deletions
+2
View File
@@ -16,6 +16,7 @@ export const PLAYER_SOURCE = {
AMAZON: 'https://www.amazon.',
HULU: 'https://www.hulu.',
DISNEY: 'https://www.disneyplus.',
YOUTUBE: 'https://www.youtube.',
LOCAL: 'http://localhost',
};
@@ -25,6 +26,7 @@ export const getPlayerSource = () => {
if (HREF.startsWith(PLAYER_SOURCE.HULU)) return PLAYER_SOURCE.HULU;
if (HREF.startsWith(PLAYER_SOURCE.AMAZON)) return PLAYER_SOURCE.AMAZON;
if (HREF.startsWith(PLAYER_SOURCE.DISNEY)) return PLAYER_SOURCE.DISNEY;
if (HREF.startsWith(PLAYER_SOURCE.YOUTUBE)) return PLAYER_SOURCE.YOUTUBE;
if (HREF.startsWith(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL;
};