Jump to content

Muting twitch audio in emblem code.

I'm having trouble with the video player when I coppied the emblem code from my twitch stream onto my site.
And the problem is that he starts playing but with the audio to. And I don't want that.
But I have no clue in how to mute the audio in there.
 
I already tryed adding volume=0 in some spots in the code but that didn't work for me but I also not sure were I had to past that.
If that even was the correct code :') I only read some basics off coding a year or 2 back so i'm kinda a noob on this one :)
 
 
 
This is the emblem code from my teststream:

<iframe src="http://www.twitch.tv/dmh_gaming/embed" frameborder="0" scrolling="no" height="378" width="620"></iframe><a href="http://www.twitch.tv/dmh_gaming?tt_medium=live_embed&tt_content=text_link" style="padding:2px 0px 4px; display:block; width:345px; font-weight:normal; font-size:10px;text-decoration:underline;">Watch live video from DMH_Gaming on www.twitch.tv</a>
 
Who will be the hero that saves me :D
And thx for the read :) Edited by colonel_mortis
Code tags
Link to comment
Share on other sites

Link to post
Share on other sites

There are two ways to embed Twitch streams - the flash object way and the newer iframe way (which you are currently using). The iframe method is generally recommended, particularly because as twitch moves towards HTML5 support (which they are starting to roll out for some devices now), but it doesn't support volume control. If you really need to support volume control, you should replace the iframe tag with the following to use the flash embed API:

<object bgcolor="#000000"         data="//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf"         height="378"         type="application/x-shockwave-flash"         width="620"         >   <param name="allowFullScreen"           value="true" />  <param name="allowNetworking"           value="all" />  <param name="allowScriptAccess"           value="always" />  <param name="movie"           value="//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf" />  <param name="flashvars"           value="channel=dmh_gaming&auto_play=true&start_volume=0" /></object>

If you want to disable autoplaying, change the auto_play=true on the penultimate line to auto_play=false.

Source: Their developer documentation

HTTP/2 203

Link to comment
Share on other sites

Link to post
Share on other sites

You my friend are my hero :D

Have been stuck on that for hours yesterday :D

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×