I want to embed a twitch stream into my site but I want it so it is not autoplaying when you go to that page. How would I do this in iFrame? I cannot find anywhere on the internets.
<iframe src="http://www.twitch.tv/civilgamersstream/embed" frameborder="0" scrolling="no" height="378" width="620"></iframe>Watch live video from CivilGamersStream on www.twitch.tv
I will use http://www.twitch.tv/twitch/c/5894318 as an example.
Go there and get the share embed code. It should look a lot like this:
<object bgcolor="#000000" data="http://www.twitch.tv/swflibs/TwitchPlayer.swf" height="378" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="620">
<param name="movie" value="http://www.twitch.tv/swflibs/TwitchPlayer.swf" />
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="allowFullScreen" value="true" />
<param name="flashvars" value="channel=twitch&auto_play=false&start_volume=25&videoId=c5894318&device_id=SLJemBs" />
</object>
Take that and update http://www.twitch.tv/swflibs/TwitchPlayer.swf to http://www.twitch.tv/widgets/archive_embed_player.swf and you should get this:
<object bgcolor="#000000" data="http://www.twitch.tv/widgets/archive_embed_player.swf" height="378" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="620">
<param name="movie" value="http://www.twitch.tv/widgets/archive_embed_player.swf" />
<param name="allowScriptAccess" value="always" />
<param name="allowNetworking" value="all" />
<param name="allowFullScreen" value="true" />
<param name="flashvars" value="channel=twitch&auto_play=false&start_volume=25&videoId=c5894318&device_id=SLJemBs" />
</object>
I have no idea why Twitch is not letting you choose between the two, but that is what I found and it works for me.
Related
I'm stack with a html code for video. I need to display 4 video in one page, the problem that they start at the same time. I've tried the autoplay=false in the embed and param balises. It continue to start at the same time and I have Four audio/video flow when I display the page, that's very incovenient.
I obtain this code from the site who provide these video and I have no other to access to these video...
<object id="flashObj" width="480" height="270" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0">
<param name="movie" value="http://" />
<param name="bgcolor" value="#FFFFFF" />
<param name="flashVars" value="videoId=4565607515001&linkBaseURL=http...html&playerID=1225340306001&playerKey=AQ~~,AAAAzBCHAyE~,4dQGL3-Dcc6XwcfI5g-30keqabkKeAfs&domain=embed&dynamicStreaming=true" />
<param name="base" value="http://admin.brightcove.com" /><param name="seamlesstabbing" value="false" />
<param name="allowFullScreen" value="true" />
<param name="swLiveConnect" value="true" />
<param name="allowScriptAccess" value="always" />
<embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1" bgcolor="#FFFFFF" flashVars="videoId=4565607515001&linkBaseURL=http...html&playerID=1225340306001&playerKey=AQ~~,AAAAzBCHAyE~,4dQGL3-Dcc6XwcfI5g-30keqabkKeAfs&domain=embed&dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="480" height="270" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
I guess the variables name are CaSe SenSitive, you should try autoPlay=false, i.e.:
flashVars="videoId=4565607515001&linkBaseURL=http...html&playerID=1225340306001&playerKey=AQ~~,AAAAzBCHAyE~,4dQGL3-Dcc6XwcfI5g-30keqabkKeAfs&domain=embed&dynamicStreaming=true&autoPlay=false
UPDATE:
After setting:
<param name="swLiveConnect" value="false" />
The video doesn't auto-play anymore, here's the full code I've used:
<object id="flashObj" width="480" height="270" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0">
<param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1&autoStart=false" />
<param name="bgcolor" value="#FFFFFF" />
<param name="autoStart" value="false" />
<param name="flashVars" value="videoId=4565606700001&linkBaseURL=http%3A%2F%2Fbfmbusiness.bfmtv.com%2Fmediaplayer%2Fvideo%2Folivier-delamarche-vs-laurent-berrebi-22-d-un-point-de-vue-fondamental-la-phase-haussiere-en-zone-euro-va-se-poursuivre-1910-665043.html&playerID=1225340306001&playerKey=AQ~~,AAAAzBCHAyE~,4dQGL3-Dcc6XwcfI5g-30keqabkKeAfs&domain=embed&dynamicStreaming=false" />
<param name="base" value="http://admin.brightcove.com" />
<param name="seamlesstabbing" value="false" />
<param name="allowFullScreen" value="true" />
<param name="autoStart" value="false" />
<param name="swLiveConnect" value="false" />
<param name="allowScriptAccess" value="always" />
<embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1&autoStart=false" bgcolor="#FFFFFF" flashVars="videoId=4565606700001&linkBaseURL=http%3A%2F%2Fbfmbusiness.bfmtv.com%2Fmediaplayer%2Fvideo%2Folivier-delamarche-vs-laurent-berrebi-22-d-un-point-de-vue-fondamental-la-phase-haussiere-en-zone-euro-va-se-poursuivre-1910-665043.html&playerID=1225340306001&playerKey=AQ~~,AAAAzBCHAyE~,4dQGL3-Dcc6XwcfI5g-30keqabkKeAfs&domain=embed&dynamicStreaming=false" base="http://admin.brightcove.com" name="flashObj" width="480" height="270" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" swLiveConnect="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object>
How could I make this section of code valid? I have not had much experience with flash embedment.
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="999" height="241" title="">
<param name="movie" value="images/banner.swf" />
<param name="quality" value="high" />
<param name="BGCOLOR" value="#EFE8DE" />
<param name="wmode" value="opaque" />
<embed src="images/banner.swf" width="999" height="241" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="opaque"</embed></object>
</noscript>
Look at the syntax highlighting in your question. It should give it away.
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="999" height="241" title="">
<param name="movie" value="images/banner.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#efe8de" />
<param name="wmode" value="opaque" />
<embed src="images/banner.swf" width="999" height="241" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="opaque"></embed>
</object>
</noscript>
So I have a flash site and I am curious why it is not working in Chrome. The site works great for Safari, Firefox, and IE. Just won't work in Chrome. Well below is the code and any help is necessary. Also can you explain why it doesn't work?
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="750" height="470" id="mariocoded" align="middle">
<param name="movie" value="mariocoded.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="mariocoded.swf" width="750" height="470">
<param name="movie" value="mariocoded.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
You have two nested <object> tags instead of <object> and <embed>. Chrome, Safari and FF all use <embed>, so it's actually surprising the player runs in FF and Safari at all.
replace all that code with just this single line of code and it should work in all browsers...
<embed src="mariocoded.swf" width="750" height="470" />
I had a similar problem...if I took away the param name="movie" from the outer object it worked for me (but of course not in IE so you have to selectively show it for IE). I think chrome gets confused and recognizes the movie parameter but instead of ignoring it, it decides that it just won't show anything.
Another interesting thing is that if you open up the developer tools for google chrome (using your original code) you can mouseover the html flashContent div and the flash file will appear. It's like it's there underneath but the movie parameter screws it up.
Hope this helps.
Kevin
Kevin you got it - If you inspect the flash element using Chrome's element inspector, edit as html and remove the name=movie it will display so the conditional comments should work wonders
You may try like this, as i am also using Flash in Chrome but for that i have used Both as here
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="1000" height="250" id="FlashVars_AS2" align="middle">
<param name="movie" value="MuShagPlayer.swf" />
<param name="quality" value="low" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name=FlashVars value="surl=http://www.mp3hungama.com/music/audio/Indian/Indian%20Movies/3G%20(2013)/songs/Kaise%20Bataaoon%20#%20Mp3HunGama.Com.mp3&waveform=${waveform}&tle=${songTitle}&sId=${songId}" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="MuShagPlayer.swf" width="1000" height="250">
<param name="movie" value="MuShagPlayer.swf" />
<param name="quality" value="low" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name=FlashVars value="surl=http://www.mp3hungama.com/music/audio/Indian/Indian%20Movies/3G%20(2013)/songs/Kaise%20Bataaoon%20#%20Mp3HunGama.Com.mp3&waveform=${waveform}&tle=${songTitle}&sId=${songId}" />
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</object>
</object>
May you can edit
from:
<param name="play" value="true" />
became:
<param name="autoplay" value="true" />
i have try it and then successed.
Edit: I've come to realize the main problem I'm facing is that I want a text field that already exists in a movieclip or on the stage to take the string from a flashvar. For some reason it will not do that. How do I make a pre-existing text field change to match the flashvar text?
Html:
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="29px" id="egnewsTicker" align="middle">
<param name="movie" value="egnewsTicker.swf" />
<param name="flashvars" value="newslisttest=this is my test" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="false" />
<param name="devicefont" value="false" />
<param name="salign" value="lt" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="egnewsTicker.swf" width="100%" height="29px">
<param name="movie" value="egnewsTicker.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<param name="scale" value="showall" />
<param name="menu" value="false" />
<param name="devicefont" value="false" />
<param name="salign" value="lt" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="flashvars" value="newslisttest=this is my test" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
I know this is supposed to be a simple task, and I have found several web articles that give examples, but I simply cannot make it work when I'm trying to do my own code. All I want to do is pass a flashvar string and be able to access it by name in flash using AS3, but I can't seem to accomplish that.
I'm trying:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
newsItem.newsHeadline.text = String(paramObj[varName]);
I've also tried:
newsItem.newsHeadline.text = this.loaderInfo.parameters.newslisttest;
Nothing I try works, it always just stays blank. What is the trick to accessing flashvars in flash as3? I'm just not getting it and I can't find a good explanation anywhere...
Try this: stage.loaderInfo.parameters.yourparam or stage.loaderInfo.parameters["yourparam"]
Can you post your html code, so we can see how you pass the flashvars to Flash.
I've been wasted all the day long for that...
AS3:
var uid:String;
// your code
this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
// your code
function loaderComplete(e:Event=null):void
{
var fv = stage.loaderInfo.parameters;
uid = fv['uid'] || "'uid' not found";
}
HTML:
<object type='application/x-shockwave-flash' data='/flash/yourSWF.swf' width='320' height='240'>
<param name='wmode' value='transparent' />
<param name='FlashVars' value='uid=yourData' />
<param name='movie' value='/flash/yourSWF.swf' />
</object>
If you are still having this problem, follow below lines.
I used flash vars, they work fine for me.
My html script was:
<html>
<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"FlashVars="uid=123&name=santhu" width="100%" height="100%" id="index" align="middle">
<param name="movie" value="index.swf" />
<param name=FlashVars value="uid=123&name=santhu">
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="index.swf"
FlashVars="uid=123&name=santhu" width="100%" height="100%">
<param name="movie" value="index.swf" />
<param name=FlashVars value="uid=123&name=santhu">
<!--<![endif]-->
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
and my AS code to load vars is
this.root.loaderInfo.addEventListener(Event.COMPLETE, SWFLoadComplete);
private function SWFLoadComplete(e:Event)
{
obj=this.root.loaderInfo.parameters;
trace(obj.uid , obj.name); // outputs: 123 santhu
}
How come http://www.zolomon.com/wptj/wp-content/themes/default/polaroid.swf
works perfectly but not when implemented at http://www.zolomon.com/wptj/?page_id=8 ?
The code I use to insert the .swf-file is the following:
<object width="522" height="490" id="polaroid" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="polaroid.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="bgcolor" value="#DFCEAF" />
<embed src="wp-content/themes/default/polaroid.swf" menu="false" quality="high" scale="noscale" wmode="transparent" bgcolor="#ffffff" width="522" height="490" name="polaroid" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>
When inspecting the HTTP requests, your photos.xml has the wrong link. It is requesting:
http://www.zolomon.com/wptj/photos.xml
And on the working version you are requesting:
http://www.zolomon.com/wptj/wp-content/themes/default/photos.xml
Make sure the paths is right in the webpage.