Hi, can you copy-paste your code here please ?
twitchname is <span class="twitch-status-channel-twitchname">
<span class="twitch-is-online">online!</span>
<span class="twitch-is-offline">offline. </span>
<span class="twitch-is-loading">...</span>
<span class="twitch-viewers"></span></span>
(And yes, I have an actual name there, just changed for privacy)
-
This reply was modified 9 years, 6 months ago by
Trex2303.
-
This reply was modified 9 years, 6 months ago by
Trex2303.
Try this :
<div class="twitch-is-online twitch-status-channel-twitchname"><iframe src="http://player.twitch.tv/?channel=twitchname" allowfullscreen></iframe></div>
(replace twitchname by your actual name)
I’ll let you know when one of the users goes online how it pans out. Would it work the same of they were “offline” and still show a video with their “offline” image they have set? Or won’t that work the same way?
(EDIT)
Nevermind, it works offline… Thanks.
-
This reply was modified 9 years, 6 months ago by
Trex2303.
Okay, All is working now “except for 1 item”.
Viewers: <span class=”twitch-viewers”></span>
All this shows is the text of “Viewers”, then a little “eye” all the way over to the right, but it doesn’t show any numbers or anything for the viewers. Should a make a new post for that?
Okay, I resolved the viewers issue… I had another issue with hearing “echo”, and when I paused the video, you could still hear the sounds… So what I found out is that you can’t have 2 pieces of script for video (One for offline and one for online), other wise it plays 2 at the same time, even though they aren’t offline, it still plays the video for offline. So I resolved that as well.
Soooo everything is currently up and running perfectly.
I recently updated the plugin. You can now embed the player with a shortcode, try this:
[twitch-player channel="mychannelname" chat="true"]
Is the size of the video hardcoded? Or can the size be changed?
It adapts automatically to 100% of its container width so if you want a fixed size, just nest it into a container with a fixed size.
<div style="width: 640px">[twitch-player channel="mychannelname" chat="true"]</div>
I tried with the height too, but it seems to only adjust the height for the chat and not the video. Even if chat=”false”, it still doesnt resize the video.