Back to feed

embed twitch streams/vods.

Smokey · 6 months ago · 3 replies · 445

Howabout a BBcode to embed a twitch stream or even twitch VOD?

Or something that'll allow us to embed a twitch stream on a webpage along w/ the stream's chat window.

A way to pull in the stream when said streamer is live each time would also be helpful.....

that'd probably take a bit more work though but it would be neat to see.

3 replies
Cedric · 6 months ago

I assume Twitch works with an iframe? You could add that to a custom page using HTML. As said before, BBcode isn't something I plan on adding again.

Smokey OP · 6 months ago

Could possibly do that. There's two types of embed coding available for both the stream & chat.

Here's an example:

Javascript:

<!-- Add a placeholder for the Twitch embed -->
<div id="twitch-embed"></div>

<!-- Load the Twitch embed script -->
<script src="https://player.twitch.tv/js/embed/v1.js"></script>

<!-- Create a Twitch.Player object. This will render within the placeholder div -->
<script type="text/javascript">
  new Twitch.Player("twitch-embed", {
    channel: "passtheplunger"
  });
</script>

Iframe:

<iframe src="https://player.twitch.tv/?channel=passtheplunger&parent=www.example.com" frameborder="0" allowfullscreen="true" scrolling="no" height="378" width="620"></iframe>

Cory · 6 months ago

If this won't be made a default feature, I can create a JavaScript code to accomplish it.

Create a free account to join the conversation.
Sign up free
ForumSpark © 2023 - 2026 · ForumSpark.net · Terms