Problem with Chrome - embed windows media player - google-chrome

I am having a problem. I embed WMP in my page, and I need to hide buttons from player. I make it to hide them in IE and FF, but I can't make it happen in Google Chrome.
Here is the code
<object id="MediaPlayer1" width="690" height="500" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject"
>
<param name="FileName" value='<%= GetSource() %>' />
<param name="AutoStart" value="True" />
<param name="DefaultFrame" value="mainFrame" />
<param name="ShowStatusBar" value="0" />
<param name="ShowPositionControls" value="0" />
<param name="showcontrols" value="0" />
<param name="ShowAudioControls" value="0" />
<param name="ShowTracker" value="0" />
<param name="EnablePositionControls" value="0" />
<!-- BEGIN PLUG-IN HTML FOR FIREFOX-->
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
src='<%= GetSource() %>' align="middle" width="600" height="500" defaultframe="rightFrame"
id="MediaPlayer2" />
</object>
and in the JS in a method i do
var player = document.getElementById("MediaPlayer2");
player.uiMode="none";
to hide buttons in FF, but seems that not work for Chrome.

Totally crossbrowser:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
</head>
<body>
<table border="0" width="600" height="500" cellpadding="0" cellspacing="0">
<tr>
<td width="500" height="500">
<!--[if !IE]> <-->
<object id="mediaplayer" type="application/x-ms-wmp" data="video.wmv" width="500" height="500">
<param name="src" value="video.wmv" valuetype="ref" type="video.wmv">
<param name="animationatStart" value="1">
<param name="transparentatStart" value="1">
<param name="autoStart" value="1">
<param name="ShowControls" value="0">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="playcount" value="10">
<param name="autoRewind" value="1">
<param name="displaysize" value="0">
<param name="stretchtofit" value="1">
<param name="enableContextMenu" value="0">
<param name="uiMode" value="none">
<strong>Error:</strong>You need Windows Media Player Plugin.
</object>
<!--> <![endif]-->
<!--[if IE]>
<object id="mediaplayer" type="video/x-ms-wmv" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="500" height="500">
<param name="url" value="video.wmv" valuetype="ref" type="video/x-ms-wmv">
<param name="animationatStart" value="1">
<param name="transparentatStart" value="1">
<param name="autoStart" value="1">
<param name="ShowControls" value="0">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="playcount" value="99999">
<param name="clickToPlay" value="1">
<param name="autoRewind" value="1">
<param name="displaysize" value="0">
<param name="stretchtofit" value="1">
<param name="enableContextMenu" value="0">
<param name="uiMode" value="none">
<strong>Error:</strong>You need Windows Media Player Plugin.
</object>
<![endif]-->
</td>
<td>
<input type="button" value="uiMode Full" onclick="document.getElementById('mediaplayer').uiMode='full'">
<input type="button" value="uiMode None" onclick="document.getElementById('mediaplayer').uiMode='none'">
</td>
</tr>
</table>
</body>
</html>

The Windows Media Player plugin does not natively work in chrome. Chrome is based on Safari, so if you can find a plugin for safari, you should be able to use this in chrome. Otherwise, you will not be able to play wmp videos in chrome.

Related

How to hide playing track name in media player

I need to hide the track name that is getting played inside media player for Internet Explorer. Below is my code.
<object id="mediaPlayer" width="320" height="240" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" name="mediaPlayer">
<param name="URL" value="bcr_ahlacc.mpg" />
<param name="SendPlayStateChangeEvents" value="true" />
<param name="AutoStart" value="true" />
<param name="PlayCount" value="1" />
<param name="stretchtofit" value="true" />
<param name="showstatusbar" value="true" />
<param name="enablepositioncontrols" value="false" />
<param name="showpositioncontrols" value="false" />
<param name="enabletracker" value="false" />
<param name="showcontrols" value="false" />
<param name="showaudiocontrols" value="false" />
<param name="enablecontextmenu" value="true" />
<param name="uiMode" value="Full" />
it shows video name "bcr_ahlacc.mpg" while it is getting played, which I want to hide.
Thanks
Guess you need this:
<param name="ShowDisplay" value="false">
When set to true, it displays information such as the file name.
Info found here

HTML swf container resize

I have a kinda simple flash file. Just one layer. For the first 50 frames I just have an img file which has 300px height.
At 51 frame i load another image with the same width but with 150px height.
I have this code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>masterhead</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="980" height="235" id="masterhead" align="middle">
<param name="movie" value="masterhead.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="masterhead.swf" width="980" height="235">
<param name="movie" value="eradio_masterhead.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>
<div>
<br> just some text </br>
</div>
</body>
</html>
Problem is that swf container doesn't resize at the frame 51.
How I ccan do that;
Thank you
Simply ** Flash Cant**
The SWF file is a container pre compiled file, It will not resize as the properties of the file are already declared when you compiled it and in your parameters tags.
Html divs with Css will also not resize the SWF as the page is separate and has no interactivity with the flash content already displayed.
Im not too sure if this would be possible with javascript during runtime, but that is another question....

how to remove controls from embedded video?

Is it actually impossible to remove the UI controls from this embedded video?
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_objectmplayer
<param showcontrols="false">
<param uiMode="invisible">
...showcontrols="false"...
does not hide the controls - contrary to natural english meaning of "show controls"
EDIT: --THE FOLLOWING WORKS & IS CROSS-BROWSER (until IE10)...
EDIT2: --BUT THE FOLLOWING ALSO SEEMS TO CAUSE NEVER-ENDING-SENDRESPONSE-STATUS WORKER PROCESSES (SEE https://stackoverflow.com/questions/16790199/iis7-5-wmv-requests-cause-many-workerprocesses-in-never-ending-sendresponse-stat)
<!--[if IE]>
<object id="MediaPlayer" style="height:100%" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="filename" value="3d.wmv" />
<param name="Showcontrols" value="false" />
<param name="autoStart" value="True" />
<param name="wmode" value="transparent" />
</object>
<![endif]-->
<!--[if !IE]><!-->
<object id="mediaplayer" type="application/x-ms-wmp" data="3d.wmv" width="100%" height="80%">
<param name="src" value="3d.wmv" valuetype="ref" type="3d.wmv">
<param name="autoStart" value="1">
<param name="ShowControls" value="0">
<param name="Showcontrols" value="false" />
<param name="autoStart" value="True" />
<param name="wmode" value="transparent" />
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="0">
<param name="playcount" value="10">
<param name="autoRewind" value="1">
<param name="displaysize" value="0">
<param name="stretchtofit" value="1">
<param name="enableContextMenu" value="0">
<param name="uiMode" value="none">
<embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
<!--<![endif]-->
Taking your W3Schools example code -
<!DOCTYPE html>
<html>
<body>
<object width="100%" height="100%"
type="video/x-ms-asf" url="3d.wmv" data="3d.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="3d.wmv">
<param name="filename" value="3d.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full">
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="3d.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
</body>
</html>
Change
<embed... showcontrols="true"...
to
<embed... showcontrols="false"...

SWF doesn't show up

I don't have a clue on what I'm doing wrong. Sometimes, when I open this page my html page , the swf don't appear. It won't happen always, but is really frequent.
Important: when it don't appear, I do can hear the sounds that the swf movie makes. In other words, I'm shure that the object is on the page, but it just won't be visualizable.
The error occurs on Firefox and Chrome (I didn't see it happening with IE, but I won't doubt that it is possible)
The problem isn't in the swf because I have already tested with another file that have no code at all and the same problem occurs.
Here is the page's code, generated by Flash CS5.5 when publishing the swf:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Hellbound</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body style="background-color: #000000">
<div id="flashContent">
<p align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="500" id="Hellbound" align="middle">
<param name="movie" value="Hellbound_secure.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="gpu" />
<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="Hellbound_secure.swf" width="640" height="500">
<param name="movie" value="Hellbound_secure.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="gpu" />
<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>
</body>
</html>
I know it's tempting to use the embed code generated by the Flash authoring tool's Publish feature, but I've had much better luck with one of the javascript replacement methods. I'd look at SWFobject. It seems to be the most dependable embedding routine and it's pretty easy to use. ...plus, it does a good job of handling the foibles of the various browsers.
http://code.google.com/p/swfobject/

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.