• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Embed Twitch

TeflonDon

Well-known member
#4
For some reason, I have a tough time wrapping my head around the media codes. I will check Jaxel to see if he has an addon.

Same here, I was able to create my own easily on vBulletin with the AME plugin but it seems more complicated here. :(

Hopefully there will be some sort of guide in the future.
 

Martok

Well-known member
#6
I'm raising this one about embedding Twitch.tv again.

I've taken a look at the add-on above which works great for live streaming. Unfortunately it doesn't work for videos on the site.

I've taken a look the BBCode Media Site it created and at the Matched URLs and this is what the expression is:

Code:
#(twitch|justin).tv/(?P<id>[a-z0-9-_=+^%]+)#si
Live streams use a URL of the form http://www.twitch.tv/username
Videos use a URL of the form http://www.twitch.tv/username/c/digits

What the Matched URLs code seems to do is take both of these URLs and strip them down to just username which then gets used in the embedded HTML to create the BBCode. So basically it works correctly for the live stream but not the video.

What I want to do is modify the expression so that it will work only for URLs of the form http://www.twitch.tv/username
Then I want to create another BBCode Media Site which will work for URLs of the form http://www.twitch.tv/username/c/digits

Any help from @Jake Bunce or any other regex gurus would be greatly appreciated. :)