Why my embedded video resizes automatically? - html

this time I have a page which will load different kinds of file formats, well... i use a switch with php to load the correct player according to the filetype. But when I try to load a wmv file, the video automatically grows and exceeds the allowed size that i gave the player... i don't know how to prevent that. Here is my code:
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480" height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/">
<param name="Filename" value="files/' . $file . '">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="true">
<param name="AutoSize" value="false">
<param name="InvokeURLs" value="false">
<embed src="files/' . $file . '" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1" showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="480" height="360"></embed>
Well, I thought the solution was to change "AutoSize" value, i tried false and true, but it keeps doing it. Any ideas?

Ok, I did some research and i found that it has to do something with the classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" i don't know exactly what it does, but when i changed that to clsid:05589FA1-C356-11CE-BF01-00AA0055595A, the player stopped resizing. The problem is, that for some reason, when it loads whatever information it takes from the microsoft page, it adds the following style to my code: style="WIDTH: 640px; HEIGHT: 549px; TOP: 13px; LEFT: 43px" and also changes the size and width of the video.
Would be nice if someone could help me research this.

Perhaps if you set width: 100% and ensured that any DIV it's in was also 100% that might do the trick. If not, try style="width:100% !important" to override the extra styling code being added.
I use Developer Tools in Chrome (or IE9 or Firebug) to change the styles on the object interactively and see the results immediately.

Related

Auto Play isn't working for swf flash video (weather app)

I may be missing something but I am trying to embed a weather app I found into my website. I am using this as my HTML code:
<div style="width:800px; height:250px;">
<object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf&autostart=true" width="800" height="250">
<param name="movie" value="http://swf.yowindow.com/yowidget3.swf&autoStart=true"/>
<param name="allowfullscreen" value="true"/>
<param name="wmode" value="opaque"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="autoPlay" value="true"/>
<param name="flashvars"
value="location_id=gn:5007804&location_name=Royal%20Oak&time_format=12&unit_system=us&background=#FFFFFF&mini_temperature=true&mini_time=true&mini_locationBar=true&mini_action=full_screen&copyright_bar=false;&autostart=true;"
/>
</object>
</div>
Notice how I put the param name = "Autoplay" value="true" line as well as trying to put it in the URL. Am I missing something here?
If I just paste the URL http://swf.yowindow.com/yowidget3.swf into a webbrowser, it auto plays no problem so it must be one of the parameters I have entered wrong.
I have looked many times on StackOverflow for a solution and have entered autoPlay="true" in many spots without any luck.
I tested your shown code and it's working fine (Chrome browser on Windows). Maybe you need to clear browser history & clear any cached files?
It only shows a "click to play" icon if the display width is smaller than 600px. Did you ever have such a smaller setting that is being cached & re-used?
Also regarding data="http://swf.yowindow.com/yowidget3.swf&autostart=true" the &autostart=true is not needed. Please remove it & test again (resave as different filename.html if needed).

wmode (transparent) for CGI rather than flash

I have a CGI in an object (from an ethernet webcam) which works fine for most browsers but not for IE (10). The problem is that my menu should be shown above that element but it isn't. I know of but that - as it seems - only applies to SWF sources in an object. Also, zindex could not help.
In other words, this
<object width="640" height="480" id="Player" classid="CLSID:..." codebase="http://my.server/activex/AMC.cab#version=2,0,22,0" style="z-index: 104;">
<PARAM NAME="_cx" VALUE="16933">
<PARAM NAME="_cy" VALUE="12700">
<PARAM NAME="MediaURL" VALUE="http://my.server/axis-cgi/mjpg/video.cgi?resolution=640x480">
<PARAM NAME="UIMode" VALUE="none">
<PARAM NAME="MediaType" VALUE="mjpeg-unicast">
<PARAM NAME="MPEG2VideoDecodingMode" VALUE="3">
<param name="wmode" value="transparent">
<p>Error</p></object>
does hide an absolutely positioned menu dropdown that should be shown above it.
Any ideas on that?
Best regards,
Mario

How to create blank space to replace white in a code

Being a relatively new user of flash, I might not use the right "terms" and thus end up confusing you. For that, I apologize in advance. Anyway, I am trying to use this:
http://abowman.com/google-modules/stingray/?edit=true
Widget, as its maker calls it. What I am trying to do is make the background an unspecific amount of blank space - so the the stingray would float over my webpage without obstructing its content. I thought of 2 methods, both of which didn't work;
Change the background image to a large empty .png, and
Simply remove everything that looked background related in the code.
Despite my best, and rather pitiful, efforts, I can get nothing but a big ugly square of white. Any ideas? Oh, here's my code by the way:
<object type="application/x-shockwave-flash" style="outline:none;" data="http://stingraygadget.googlecode.com/svn/trunk/stingray.swf?up_stingrayColor=000000&up_backgroundImage=&up_backgroundColor=FFFFFF&up_stingrayName=Stingray&up_speed=.2&" width="300" height="200">
<param name="movie" value="http://stingraygadget.googlecode.com/svn/ trunk/stingray.swf?up_stingrayColor=000000&up_backgroundImage=http://i.imgur.com/0Id3HHg.png&up_backgroundColor=FFFFFF&up_stingrayName=Stingray&up_speed=.2&"></param>
<param name="AllowScriptAccess" value="always"></param>
<param name="wmode" value="opaque"></param>
<param name="scale" value="noscale"/>
<param name="salign" value="tl"/>
</object>
Thank you!
You can set the background of a flash to tranparent if you wish.
<param name="wmode" value="transparent" />
However this is not supported in all browsers AND I'm not sure if you can do this without saving the .swf-file as a file with transparent background (you should have made it yourself to do this (?))
FYI: isflashdeadyet.com

Flash frame-rate is different in browser than it is in flash player

I am using Flash CS4 and when testing my application my frame rate changes as it is programmed to do so. When I try to run the application in a browser (tried Firefox 4, Opera 10.5 and IE 8) the frame rate does not change.
Why does the frame-rate not change? How do I fix it?
The newest Flash Players are capped at a maximum of 60fps, no matter what number you use to set the framerate. That could be one issue... But if objects on the screen are slowing down there's nothing to be gained by changing the framerate. It means that your swf isn't well optimized, and the player is struggling to render the assets.
Set your HTML so that the Flash Object's wmode is "opaque" (or transparent if you really need to). If you don't specify it, it will interpret it as some other default parameter which gives you that drop in frame-rate performance.
Sample:
<object type="application/x-shockwave-flash" data=
"YourFlashMovie.swf" width="640" height="480"
id="flash_id_1" style="visibility: visible;">
<param name="allowScriptAccess" value="always" />
<param name="allowScale" value="never" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="opaque" /> <!-- THIS IS WHAT YOU MUST SET -->
<param name="quality" value="high" />
<param name="scale" value="" />
<param name="scaleMode" value="" />
<param name="menu" value="false" />
</object>
Hope that helps.

Display HTML elements overtop embedded QuickTime

I have a site where a jQuery dialog is used to show videos in a modal frame.
I would like to be able to rest the close button so that it partially covers the embedded QuickTime object, much like the modal frame in this picture:
http://ajaxdump.com/wp-content/uploads/2009/08/MooTools_SqueezeBox-Expandable-Lightbox-308x400.gif
QT always renders above any other element.
I've looked around for solutions, but I've had little luck with it. Is this even possible? Or should I just give up hope now?
You need to adjust the wmode parameter of the Quicktime object to "transparent" in order for it to display beneath other content.
You'd want to set it up like this in your HTML:
<object width="500" height="250" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"
id="video_object" style="behavior:url(#qt_event_source);" class="plugin" >
<param name="src" value="whatever.png">
<param name="autoplay" value="false">
<param name="postdomevents" value="true">
<param name="wmode" value="transparent">
<param name="controller" value="false">
<param name="scale" value="tofit">
<embed id="video_embed" class="plugin"
type="video/quicktime" src="whatever.png"
wmode="transparent" postdomevents="true" controller="false" scale="tofit" >
</embed>
</object>
Have a look at this demo.