Announcement

Collapse
No announcement yet.

Twitch BBCode

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by DOSO View Post

    Yesss! It works!
    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?

    Comment


      #17
      It's late here. I'll check tomorrow if that can be done.
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


      • DOSO
        DOSO commented
        Editing a comment
        Ok. No problem. Thanks for all of your outstanding help. I really appreciate it.

      #18
      Ok. No problem. Thanks for all of your outstanding help. I really appreciate it.

      Comment


        #19
        Originally posted by glennrocksvb View Post
        It's late here. I'll check tomorrow if that can be done.
        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.

        Once again, thanks for your outstanding work.

        Comment


          #20
          Originally posted by glennrocksvb View Post
          Try including www in the domain name
          That was the ticket. Working on our site now as well.

          Thank you.
          The Linux Community has given me much. I do what I can to return the favor!

          Comment


            #21
            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.
            Try this:

            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>
            Replace 'www.yourdomain.com' with your own domain. Don't remove the single quotes around it.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


            • glennrocksvb
              glennrocksvb commented
              Editing a 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.

            #22
            Originally posted by glennrocksvb View Post

            Try this:

            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>
            Replace 'www.yourdomain.com' with your own domain. Don't remove the single quotes around it.
            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.

            Comment


              #23
              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.
              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.

              Comment


                #24
                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.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #25
                  Originally posted by glennrocksvb View Post
                  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.
                  Ok. I think clips are short videos. I think they expire.

                  Comment


                    #26
                    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
                    Helpful? Donate. Thanks!
                    Buy me a coffeePayPal QR Code
                    Fast VPS Host for vBulletin:
                    A2 Hosting & IONOS

                    Comment


                      #27
                      I found the issue. Working on a fix...
                      Helpful? Donate. Thanks!
                      Buy me a coffeePayPal QR Code
                      Fast VPS Host for vBulletin:
                      A2 Hosting & IONOS

                      Comment


                        #28
                        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>
                        Helpful? Donate. Thanks!
                        Buy me a coffeePayPal QR Code
                        Fast VPS Host for vBulletin:
                        A2 Hosting & IONOS

                        Comment


                          #29
                          Originally posted by glennrocksvb View Post
                          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>
                          Yesss!!! It works. I can do all three now. Thanks alot Glenn.

                          Comment


                            #30
                            Thanks for confirming the latest code works. I have updated the code in the first post to reflect the latest changes.
                            Helpful? Donate. Thanks!
                            Buy me a coffeePayPal QR Code
                            Fast VPS Host for vBulletin:
                            A2 Hosting & IONOS

                            Comment

                            Latest Topics

                            Collapse

                            Working...
                            X