Added twitch as default media provider
authorMarcel Werk <burntime@woltlab.com>
Tue, 1 Aug 2017 13:03:16 +0000 (15:03 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 1 Aug 2017 13:03:36 +0000 (15:03 +0200)
See #2357

com.woltlab.wcf/mediaProvider.xml

index b90a2a67e8780248d4b3494e2890eb2ea9331c73..e458e91e02efa6ba7703c6001ddb9b6363f579bf 100644 (file)
@@ -81,5 +81,18 @@ https?://open.spotify.com/user/(?<USER>[0-9a-zA-Z]+)/playlist/(?<ID>[0-9a-zA-Z]+
 https?://open.spotify.com/(?<TYPE>[a-zA-Z]+)/(?<ID>[0-9a-zA-Z]+)]]></regex>
                        <html><![CDATA[<iframe width="300" height="380" src="https://embed.spotify.com/?uri=spotify:{$TYPE}:{$ID}" frameborder="0" allowtransparency="true"></iframe>]]></html>
                </provider>
+               
+               <provider name="twitch-channel">
+                       <title>Twitch Channel</title>
+                       <regex><![CDATA[https?://www.twitch.tv/(?!videos)(?!.*/v/)(?<CHANNEL>[a-zA-Z0-9_]+)]]></regex>
+                       <html><![CDATA[<div class="videoContainer"><iframe src="https://player.twitch.tv/?channel={$CHANNEL}&autoplay=false" frameborder="0" scrolling="no" allowfullscreen></iframe></div>]]></html>
+               </provider>
+               
+               <provider name="twitch-video">
+                       <title>Twitch Video</title>
+                       <regex><![CDATA[https?://www.twitch.tv/videos/(?<ID>[0-9]+)
+https?://www.twitch.tv/[a-zA-Z0-9]+/v/(?<ID>[0-9]+)]]></regex>
+                       <html><![CDATA[<div class="videoContainer"><iframe src="https://player.twitch.tv/?video=v{$ID}&autoplay=false" frameborder="0" scrolling="no" allowfullscreen></iframe></div>]]></html>
+               </provider>
        </import>
 </data>