Add initial userscript
This commit is contained in:
parent
d51722c466
commit
4feee02e33
8 changed files with 205 additions and 6 deletions
6
player/gdrive-player.coffee
Normal file
6
player/gdrive-player.coffee
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
window.GoogleDrivePlayer = class GoogleDrivePlayer extends VideoJSPlayer
|
||||
constructor: (data) ->
|
||||
if not (this instanceof GoogleDrivePlayer)
|
||||
return new GoogleDrivePlayer(data)
|
||||
|
||||
super(data)
|
||||
|
|
@ -2,7 +2,7 @@ TYPE_MAP =
|
|||
yt: YouTubePlayer
|
||||
vi: VimeoPlayer
|
||||
dm: DailymotionPlayer
|
||||
gd: GoogleDriveYouTubePlayer
|
||||
gd: GoogleDrivePlayer
|
||||
gp: VideoJSPlayer
|
||||
fi: FilePlayer
|
||||
jw: FilePlayer
|
||||
|
|
@ -33,7 +33,7 @@ window.loadMediaPlayer = (data) ->
|
|||
else if data.type is 'gd'
|
||||
try
|
||||
if data.meta.html5hack
|
||||
window.PLAYER = new VideoJSPlayer(data)
|
||||
window.PLAYER = new window.GoogleDrivePlayer(data)
|
||||
else
|
||||
window.PLAYER = new GoogleDriveYouTubePlayer(data)
|
||||
catch e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue