Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: deciph3red on April 22, 2012, 09:48:03 PM

Title: Twitch tv mod or block
Post by: deciph3red on April 22, 2012, 09:48:03 PM
Ive posted at twitch.tv and they basically pointed me in the right direction for the API but am hoping there is an easier route.
Does anyone know how to setup a block to show streams of users that are actually online and streaming?  As of right now i just have an html block that his the links in it. . . but looking at sites like teamliquid. . . i see its possible.  Any help would be greatly appreciiated.
Title: Re: Twitch tv mod or block
Post by: Colin on April 22, 2012, 10:11:54 PM
I suppose you could simply put the embed code inside of the block code. Not sure if that helps.
Title: Re: Twitch tv mod or block
Post by: TheListener on April 22, 2012, 10:22:27 PM
Hi deciph3red

Firstly what is twitch.tv?

Do you use a portal? The embed code can be placed in a php code if so.
Title: Re: Twitch tv mod or block
Post by: deciph3red on April 22, 2012, 10:48:42 PM
twitch.tv is a streaming website like youtube, but streams live.  At this time I  basically just have an HTML block setup with links to each players stream. . but want to have it only show users that are online and streaming.

Also, im using portmx
Title: Re: Twitch tv mod or block
Post by: TheListener on April 22, 2012, 10:49:47 PM
QuoteDo you use a portal?
Title: Re: Twitch tv mod or block
Post by: Colin on April 22, 2012, 10:51:04 PM
Quote from: deciph3red on April 22, 2012, 10:48:42 PM
Also, im using portmx

:)
Title: Re: Twitch tv mod or block
Post by: TheListener on April 22, 2012, 10:52:26 PM
Oops

Hey I have an excuse it's almost 4am here.

:P
Title: Re: Twitch tv mod or block
Post by: TheListener on April 22, 2012, 10:53:28 PM
Have you made a post on the mods support topic or at their own forum?
Title: Re: Twitch tv mod or block
Post by: deciph3red on April 22, 2012, 11:13:58 PM
yes i posted at twitch, and they gave me a link to the API, and no i have not posted in the mod section.

I was hoping someone here at SMF has already done this and I could just use their work.
Title: Re: Twitch tv mod or block
Post by: TheListener on April 22, 2012, 11:15:21 PM
Quote from: deciph3red on April 22, 2012, 11:13:58 PM

I was hoping someone here at SMF has already done this and I could just use their work.

This is why I asked if you had made a post in the mods support board!

:)
Title: Re: Twitch tv mod or block
Post by: deciph3red on April 23, 2012, 01:17:21 AM
Quote from: Old Fossil on April 22, 2012, 11:15:21 PM
Quote from: deciph3red on April 22, 2012, 11:13:58 PM

I was hoping someone here at SMF has already done this and I could just use their work.

This is why I asked if you had made a post in the mods support board!

:)

No sir I did not. 
Title: Re: Twitch tv mod or block
Post by: KarmicStigmata on July 10, 2015, 12:48:37 AM
So I just found this post and I am actually in the progress of creating one on my website!  We have the stream(s) up right now and are on working out the kinks with the API.  Once we get it figured out, we might try and integrate it further and release it as a mod or a block.
Title: Re: Twitch tv mod or block
Post by: deciph3red on July 21, 2015, 04:45:20 AM
awesome news.  Cant wait to help test!
Title: Re: Twitch tv mod or block
Post by: deciph3red on March 28, 2018, 02:27:06 AM
Well, after a couple of years, I have decided to give her another go.  This is what I have so far. . . . .

Installing Simple Audio Video Embedder v4.5 lets me EMBED or post the videos in a post. . . . . however I can't seem to find anytihng that lets me post the link to my channel and actually either show the video (if its live) or a link to the page (if it is NOT live, which it actually does).

Long story short, if I post a link to "https://www.twitch.tv/videos/183112402" it displays the video with play button and all.  Works great.  If I post a link to my channel (remove /videos/183112402 and add my username) it simply displays as a link to the live channel.

https://www.twitch.tv/deciph3red is my channel.  The link posted above under "/videos/183112402" is a link to a video I recorded on MY channel.  I know there isn't really a way to write a parser that can figure that out, but I swear I have had it setup before to where we all had our own SMF posts linking and showing our live ONLINE and OFFLINE status in SMF before (keep in mind its been a few years).

Considering the age of this thread, has anyone figured this out yet?