Hide video controls in Silverlight Web player - html

My Silverlight player code:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="SmoothStreamingPlayer.xap"/>
<param name="background" value="black" />
<param name="enableGPUAcceleration" value="true" />
<param name="maxFramerate" value="25" />
<param name="minRuntimeVersion" value="4.0.50401.0" />
<param name="autoUpgrade" value="false" />
<param name="InitParams" value="mediaurl=http://stream.com/name.isml/Manifest" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
So when I watch video, controls are always visible. Is thre some way to hide them?

This has instructions you to make a custom player where you can specify the controls:
http://msdn.microsoft.com/en-us/magazine/ff646972.aspx

Related

Flash element not transparent in Firefox

I put a flash mp3 player element in my HTML page.
This element has a transparent background.
<div id="player">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100" height="30" id="mp3player" align="middle">
<param name="movie" value="mp3player.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<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="mp3player.swf" width="100" height="30">
<param name="movie" value="mp3player.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="transparent" />
<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>
Firefox in Windows 7 displays a transparent background while it does not happen with Windows XP.
How can this problem be solved?
Thanks
EDIT
I noticed that my flash element at the start has a transparent background but after mouse-over the background turns black and stays black.
Is possible using jquery to force the flash wmode parameter trasparent on mouse-over and/or
mouse-out?
Thanks
While you have:
<param name="wmode" value="transparent" />
You still need this as an attribute on the object tag:
<object wmode="transparent" ....

Cannot load a youtube video from within a flash movie using google chrome only when embedded in HTML

Ok, so this is bizarrely specific and I am not sure how to proceed.
I have a flash movie which loads youtube clips into it. This works in the following situations:
--> In any browser, it works no matter what, unless it's chrome.
--> In chrome, it loads if you view the swf file directly.
however..
--> If the .swf is embedded via an tag (of apparently any kind) it will not load the youtube clips.
Fresh from a flash publish:
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="922" height="441" id="map" align="middle">
<param name="movie" value="map.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="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="map.swf" width="922" height="441">
<param name="movie" value="map.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="always" />
<!--<![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>
Here's the two methods I am using to load the thing:
//_root.ldr.loadClip(yurl,scrn);
scrn.loadMovie(yurl);
and naturally we're:
System.security.allowDomain("http://www.youtube.com");
System.security.allowDomain("http://s.ytimg.com");
System.security.loadPolicyFile("http://www.youtube.com/crossdomain.xml");
stop();
I am totally at a loss here, because it works fantastically in every other situation, browser, etc... except this one case. Any ideas?
If you are not already using it, make sure you are embeding
http://youtube.googleapis.com/v/QqXaYoU4piE
not
http://www.youtube.com/watch?v=QqXaYoU4piE&feature=g-all-u
also maybe add
youtube.googleapis.com
to your security and load the policy file from that domain
Shouldn't the file in the loadPolicyFile() call be loaded from the domain where the flash file lives? Otherwise might flash ignore the policy file?
src: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html Within-domain redirects

Add in allowfullscreen to enable full screen playback in flash player

I am using dreamweaver to embed a flash video, but cant find how to enable full screen. please advise.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="360" height="240" id="FLVPlayer" align="left">
<param name="movie" value="FLVPlayer_Progressive.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=flv/FishingForHope&autoPlay=true&autoRewind=false" />
<param name="swfversion" value="8,0,0,0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don't want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" width="360" height="240">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=flv/FishingForHope&autoPlay=true&autoRewind=false" />
<param name="swfversion" value="8,0,0,0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></p>
Apparently ActionScript is required. Here is an article about it.

Embedded Flash not working in Google Chrome?

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.

How do I access flashvars in AS3, and add them to an existing text field?

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
}