diff --git a/player/twitchclip.coffee b/player/twitchclip.coffee new file mode 100644 index 00000000..d87c2a3d --- /dev/null +++ b/player/twitchclip.coffee @@ -0,0 +1,12 @@ +window.TwitchClipPlayer = class TwitchClipPlayer extends EmbedPlayer + constructor: (data) -> + if not (this instanceof TwitchClipPlayer) + return new TwitchClipPlayer(data) + + @load(data) + + load: (data) -> + data.meta.embed = + tag: 'iframe' + src: "https://clips.twitch.tv/embed?clip=#{data.id}" + super(data)