Window Media Player issues two requests for the audio on web page - media

I'm using Windows Media Player in a web page. I have version 11 installed so that is the version I'm testing with right now. The player is embedded on the page with this HTML:
<OBJECT id='MS_mediaPlayer' width="400" height="45" classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'
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='autoStart' value="false">
<param name='uiMode' value="invisible">
<param name='loop' value="false">
</OBJECT>
I'm calling in JavaScript:
MS_mediaPlayer.URL = "SomeAudioFile.mp3"
MS_mediaPlayer.controls.play();
When I look at Fiddler I can see that the player actually downloads "SomeAudioFile.mp3" twice. Is there some setting I have wrong? I was trying to set the "autoPlay" to true and avoid calling "play()". Got the same result - two downloads.
UPDATE:
The first request's user-agent is "Windows-Media-Player/11.0.5721.5268". The second has "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)". Looks like the browser is running the same request the second time. No Idea why
Any ideas?
UPDATE (4/1/10):
Still no solution.
I debugged the JS thoroughly and there is only one call to MediaPlayer.URL='.....' to set the audio file. Nothing else triggers the media player to load the file and there is no other place referencing the audio file on the page.
One other interesting fact is that this doesn't happen (the double loading of the audio) when I run the browser locally on my development web server. But other remote requests to the same web server generate the double audio loading.
I believe I eliminated any correlation with specific IE version or media player version. This happens with IE6-8 and WM9-12

You have to examine the requests carefully. Sometimes, you'll see a media player make two requests because they are using HTTP Range requests (and not requesting the whole file). Look for a "Range" request header. Also check to make sure that neither of the requests uses the HEAD method, because that simply retrieves the server's response headers.
Also, if either of the sessions shows as aborted in the Fiddler Session List ("do not enter icon, red circle with a line through it") it means that the client closed the request in the middle. That might occur if the component starts the download, aborts it, and then restarts it. Why it might do that, I'm not sure.
You might try looking at other sites that use WMP and see whether you see two requests for them.

Related

Flash Object slow in IE and Chrome but not in Firefox(WaterFox)

Can someone please shed some light or point me in a different direction.
We are using adobe flash that launches an app inside of a JSP. Up until yesterday everything was running fine without any issues. Today when the Flash Object launches you can see the initialize bar where before you hardly seen it.
While working within the app as well all the operations are very slow (not much but a 2 second delay on most of the things is visible).
I have 3 browsers installed on my PC
IE 11 running Flash version 23.0.0.207
Chrome 55.0.2883.87 running Flash version 24.0.0.194
Waterfox 32.0 also running the same Flash version as IE 23.0.0.207
Running the app from all 3 these browsers is slow apart from Waterfox.
I deleted all the caches from the flash settings in control panel and for chrome I used the web interface (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html).
I cleared all browser caches. We are running McCafee which I disabled.
I had a look at any windows updates that was done recently which I uninstalled.
What could be different between these? What else can be checked to see what is making this app slow in IE and Chrome?
The slowness could be caused by the files not being cached by the browser like they used to be. I would start there. If you reload the page and you're not seeing a 304 "Not Modified" for the swf(s) you're loading them from the server each time where they used to be loaded from the browsers cache.
Here's some more info on the subject: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching
Both Chrome and IE have developer tools you can load to see the http calls and check the headers and response codes.
https://msdn.microsoft.com/en-us/library/dd565628(v=vs.85).aspx
https://developer.chrome.com/devtools

iframes and mixed content in IE

My goal is to embed this webpage "brokercheck.finra.org/Search/Search.aspx" into a visualforce page. I'm using an <apex:iframe/> to do this. I've tried html iframes too.
In IE8, I'm getting a message saying "do you want to view the webpage that was delivered securely" the http content only works if the user clicks no. (which is not a good practice).
on the bottom of the page I'm getting a warning that says:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)
Message: Permission denied
Line: 6
Char: 152
Code: 0
URI: http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js
Is there anything I can do on my end to get around the popup?
I've tried a few things, but nothing has been fruitful...
You're mixing an encrypted (https) content of visualforce / regular salesforce pages with unencrypted http. And sadly this website doesn't seem to have a secure version.
I'm afraid there's not much you can do, this "mixed content" warning is just a feature of IE. In fact I think it'd be pointless if websites could somehow suppress it ;) You can read about it on MSDN and the simplest thing is to ask users to modify their security settings.
You could try playing with Javascript, maybe loading content from finfra with some AJAX call... But that will be most likely treated by IE as cross-domain JavaScript and also blocked. Can you maybe simply show this page as a link / popup window? Or simply make REST GET call(s) to it server-side and display pieces of content?

Overriding the Internet Explorer 8 Browser Mode in an intranet environment

I am working on an intranet website within a corporate company where there is the Internet Explorer 8 (running on Windows XP, so cannot upgrade to IE9) used as a standard (and the only one) browser and I am dealing with the Compatibility View Mode feature. The website is based on ASP.NET 2.0 and the web server is Windows Server 2003 with IIS6.
It is not possible to switch to any other browser because some other critical third party web based applications require Internet Explorer (and ActiveX) to run properly.
I would like to ask whether there is a way how to (programmaticaly, using a http header ...) override the Internet Explorer's browser mode in case the Compatibility View Mode is turned on for Intranet websites by default or, in other words, how to force the Internet Explorer to use the IE8 Browser Mode rather than the IE8 Compatibility Mode.
I have tried to add the X-UA-Compatible http header set to IE=Edge (or IE=8) in the IIS configuration but it only affects the Document Mode, never the Browser Mode.
Thanks for any help.
Browser mode refers to the user-agent string and, IIRC, it controls the UA string that's sent to a server during HTTP negotiation. The only documented way to control that is to use the F12 developer tools.
You may want to look at Enterprise Mode[1] (EMIE), supported for Win 7 and later. When EMIE is enabled for IE, IE11 behaves and acts like IE8. This includes the UA String.
You are correct, x-ua-compatible controls only the document mode. There was a feature control key (FEATURE_BROWSER_EMULATION [2]) that might've helped, but it's unclear whether that's still supported in current versions of IE. (See the Extensibility Improvements link on that page for technical details.)
Hope this helps...
References:
[1] - http://technet.microsoft.com/en-us/library/dn640687
[2] - http://msdn.microsoft.com/en-us/library/ie/ee330730(v=vs.85).aspx#browser_emulation

HTML5 audio cross browser comtability

I work for a company and am trying to make a new demo page. I would love to dumb down the page to exactly what is not working, but unfortunately it is tied to a variety of scripts on my server, as well as AJAX requests that have to go to the same domain name. I will describe the going ons as well as possible however.
Essentially, my session code is working almost as expected. This is not where the problems lie. The problem is that the audio played after doing a "Say It" button click works as expected in Chrome,but firefox plays only the first audio request, even after subsequent ones with different text, and nothing is played in internet explorer. The relevant code is all in the head section where a group of three functions control all of what is going on. formSubmit() is called when "Say It" button is hit, onAudioLoad() is called once the audio has been loaded, and limitText() does, well, it limits the amount of text people can put in.
So formSumbmit() sends an AJAX request to my server script which returns one of two things:
1) HTML5 audio tag with the source elements with correct src attributes
or
2) A p element saying that your session has expired.
I am simply trying to get the audio to play without the horrible echo (which may or may not be caused by the actual mp3/ogg conversion software) and to have it work as expected on all browsers.
onAudioLoad sends a request to delete the audio, to avoid people stealing our product too easily :D
Expected behavior:
Whatever text is present in the demo text area will be sent server-side to be synthesized, and then the audio will be played through the client's speakers.
If you have any further questions I will be checking back here periodically.
Here is the URL of the demo:
http://www.cepstral.com/demos/temp/cepstral_tts_demo.php
Thank you for any and all help.
Ultimate Question:
Why does this work as expected in Chrome but not in Firefox 11 and IE9?
In firefox it will play only the first audio request.
In IE9 no audio is played.
I am aware that the audio is never going to be safe. We are just trying to make it more difficult for common users.
After trying to find out what was going on and having contact in chat (transcript) I've come to the following conclusion: it's an caching issue.
When trying to change text in FF and requesting a new soundfile it still plays the old sound. By checking the requests and responses it looks like you are always responding with the same filename (for the audiofile) although the sound itself is different.
When downloading that soundfile or opening it in a new tab and refresh it without cache it plays the correct sound (with the new text), so I'm pretty sure about the caching.
You should find out a way to return unique filenames for different texts to prevent browser playing the cached versions.
The same applies when testing it on IE on my machine.
EDIT by OP
Wanted to add that the reason it was not working on my IE appears to be that I am using Windows 7 N. Noted in the release notes for IE9 is the fact that Windows 7 N requires special updates to play HTML5 video. They do not mention HTML5 audio, but it is my assumption that this is the problem.

Scripting disabled in WebBrowser control?

I have a VB6 application using the WebBrowser control. It displays HTML pages from a local folder (using file:// URI scheme). Some of those pages contain embedded JavaScript code.
It all works well for the vast majority of users, but occasionally we get reports from people who have problems with everything JavaScript-related in the pages. Basically, it looks like they have scripting disabled inside the WebBrowser control.
The problem is: I cannot even reproduce the problem. I was trying to fiddle with various settings in IE security (IE8 on Win XP Pro SP3), disabling various scripting-related options for different zones (which zone includes local file system, by the way?), - I'm always having JavaScript running well in my tests.
Does anybody have any idea of what may be going wrong?
Thanks
I think I know why this is happening, it's because the IE version the WebBrowser control renders under is IE 7.0 in most, and if they are using a browser older than IE 7, it will render under IE 4.0 (seriously). They do this for backwards compatibility. So if some of your users have IE 6, their default IE rendering engine will be IE 4.0. Of course, since you are probably using IE 9, yors would be IE 7 engine.
You can change the engine, if this is what you want to do, to the current engine (ie: to the current version of internet explorer installed on the users system).
Also, I'd like you to go to http://whatsmyuseragent.com/ on your IE browser, and then through the hosted WebBrowser control; you'll see the difference.
Also, ask your problemed users to go to http://whatsmyuseragent.com/ through their hosted WebBrowser control if they can, and note the results, if they are running pre-IE-7 then most likely their hosted webbrowser control will show IE 4.0. This is almost certainly the reason for your problem.

Resources