Originally posted by DOSO
View Post
Announcement
Collapse
No announcement yet.
Twitch BBCode
Collapse
X
-
Thanks alot Glen. However, I have one more question to ask. Is there a way you could come up with some code that would enable twtitch to be able to play the video that uses a number, and also be able to play videos using the channel. Could you be able to combine them together, so that people can embed a video that has a number, and also be able to embed videos using a channel?
- Top
- Translate
- Bottom
-
It's late here. I'll check tomorrow if that can be done.
My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
I have one more idea, can you make the bbcode to where you can embed a clip, channel, or an individual video with twitch? The ones with video, are the ones that only have numbers. Those are the three scenarios that Twitch has.Originally posted by glennrocksvb View PostIt's late here. I'll check tomorrow if that can be done.
Once again, thanks for your outstanding work.
- Top
- Translate
- Bottom
Comment
-
-
Try this:Originally posted by DOSO View Post
I have one more idea, can you make the bbcode to where you can embed a clip, channel, or an individual video with twitch? The ones with video, are the ones that only have numbers. Those are the three scenarios that Twitch has.
Replace 'www.yourdomain.com' with your own domain. Don't remove the single quotes around it.HTML Code:<iframe onload="var domain='www.yourdomain.com';this.src=('{param}'.includes('-')?'https://clips.twitch.tv/embed?clip=':'https://player.twitch.tv/?')+(Number('{param}')>0?'video':'channel')+'={param}&parent=' + domain; this.onload=null;" src="" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620" style="max-width:100%;"></iframe>

My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
To add clips, you need to add inside the twitch BBCode tag all characters after "/clip/" in the Clip URL and before "?" if it exists. For example, if the Twitch Clip URL is https://www.twitch.tv/myusername/clip/MyClip-UlQu2NyjJ1pbfKGa, the bbcode tag would look like this:
[twitch]MyClip-UlQu2NyjJ1pbfKGa[/twitch]Last edited by glennrocksvb; 08-08-2022, 01:32 PM.
- Top
- Translate
- Bottom
-
Hello Glenn? I tried the clip one, it doesn't work for clips. However, it works for video and channel. It says the clip is no longer available.Originally posted by glennrocksvb View Post
Try this:
Replace 'www.yourdomain.com' with your own domain. Don't remove the single quotes around it.HTML Code:<iframe onload="var domain='www.yourdomain.com';this.src=('{param}'.includes('-')?'https://clips.twitch.tv/embed?clip=':'https://player.twitch.tv/?')+(Number('{param}')>0?'video':'channel')+'={param}&parent=' + domain; this.onload=null;" src="" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620" style="max-width:100%;"></iframe>
- Top
- Translate
- Bottom
Comment
-
I also notice that it says the domain right after the + sign. Are we supposed to put our domain where it says domain after the + sign? I tried it, and it didn't work. I put it back like it was. It works for videos and channels. The only thing that didn't work was the clips.Originally posted by DOSO View Post
Hello Glenn? I tried the clip one, it doesn't work for clips. However, it works for video and channel. It says the clip is no longer available.
- Top
- Translate
- Bottom
Comment
-
No, do not replace the domain variable after the + sign.
I don't actually use Twitch. What's the difference between clips and videos/channels? Are clips live videos that expire? I don't know why it says clip not available. I just followed the embed code URL format for clips as found in the Share button. But I'll check again.
My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
Ok. I think clips are short videos. I think they expire.Originally posted by glennrocksvb View PostNo, do not replace the domain variable after the + sign.
I don't actually use Twitch. What's the difference between clips and videos/channels? Are clips live videos that expire? I don't know why it says clip not available. I just followed the embed code URL format for clips as found in the Share button. But I'll check again.
- Top
- Translate
- Bottom
Comment
-
According to Twitch Help, they said clips don't expire but the creator can delete it.
https://help.twitch.tv/s/article/how...uage=en_US#faq

My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
I found the issue. Working on a fix...
My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
Ok, try this one. I think this fixes the clip issue.
HTML Code:<iframe onload="var domain='www.yourdomain.com';this.src='{param}'.includes('-')?`https://clips.twitch.tv/embed?clip={param}&parent=${domain}`:`https://player.twitch.tv/?${Number('{param}')>0?'video':'channel'}={param}&parent=${domain}`; this.onload=null;" src="" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620" style="max-width:100%;"></iframe>

My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
Yesss!!! It works. I can do all three now. Thanks alot Glenn.Originally posted by glennrocksvb View PostOk, try this one. I think this fixes the clip issue.
HTML Code:<iframe onload="var domain='www.yourdomain.com';this.src='{param}'.includes('-')?`https://clips.twitch.tv/embed?clip={param}&parent=${domain}`:`https://player.twitch.tv/?${Number('{param}')>0?'video':'channel'}={param}&parent=${domain}`; this.onload=null;" src="" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620" style="max-width:100%;"></iframe>
- Top
- Translate
- Bottom
Comment
-
Thanks for confirming the latest code works. I have updated the code in the first post to reflect the latest changes.
My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
Latest Posts
Collapse
-
Reply to some ideas for new modsin Chit Chatby desmomax
I finally created a mod that allows you to add an icon to each post with options for sharing on other platforms. I honestly thought it was absurd that...
Today, 03:59 AM -
by flohseHi Glenn, what do you think about adding "Like Counts" similar to "Like Counts on Postbit and Profile" (when this mod is in use) in...Yesterday, 11:28 PM
-
Reply to push notification prompt?by desmomaxhy glenn
have you thought about this?Yesterday, 05:44 AM

Comment