-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathindex.js
87 lines (86 loc) · 2.55 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import { lazy } from 'react'
import { supportsWebKitPresentationMode } from '../utils'
import { canPlay, AUDIO_EXTENSIONS } from '../patterns'
export default [
{
key: 'youtube',
name: 'YouTube',
canPlay: canPlay.youtube,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerYouTube' */'./YouTube'))
},
{
key: 'spotify',
name: 'Spotify',
canPlay: canPlay.spotify,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerSpotify' */'./Spotify'))
},
{
key: 'soundcloud',
name: 'SoundCloud',
canPlay: canPlay.soundcloud,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerSoundCloud' */'./SoundCloud'))
},
{
key: 'vimeo',
name: 'Vimeo',
canPlay: canPlay.vimeo,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerVimeo' */'./Vimeo'))
},
{
key: 'facebook',
name: 'Facebook',
canPlay: canPlay.facebook,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerFacebook' */'./Facebook'))
},
{
key: 'streamable',
name: 'Streamable',
canPlay: canPlay.streamable,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerStreamable' */'./Streamable'))
},
{
key: 'wistia',
name: 'Wistia',
canPlay: canPlay.wistia,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerWistia' */'./Wistia'))
},
{
key: 'twitch',
name: 'Twitch',
canPlay: canPlay.twitch,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerTwitch' */'./Twitch'))
},
{
key: 'dailymotion',
name: 'DailyMotion',
canPlay: canPlay.dailymotion,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerDailyMotion' */'./DailyMotion'))
},
{
key: 'mixcloud',
name: 'Mixcloud',
canPlay: canPlay.mixcloud,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerMixcloud' */'./Mixcloud'))
},
{
key: 'vidyard',
name: 'Vidyard',
canPlay: canPlay.vidyard,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerVidyard' */'./Vidyard'))
},
{
key: 'kaltura',
name: 'Kaltura',
canPlay: canPlay.kaltura,
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerKaltura' */'./Kaltura'))
},
{
key: 'file',
name: 'FilePlayer',
canPlay: canPlay.file,
canEnablePIP: url => {
return canPlay.file(url) && (document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url)
},
lazyPlayer: lazy(() => import(/* webpackChunkName: 'reactPlayerFilePlayer' */'./FilePlayer'))
}
]