In one of my customer site, they are using cloud-hosted videos for their department. Basically, a cloud based video delivery system. The videos are in MP4 and WebM format. There appears to be a problem viewing these videos using Internet Explorer (any version),from within the Citrix environment, however they play as required when using Google Chrome and Firefox. The videos play all OK without any issues outside of the Citrix environment (XenApp 6.5) using IE or any browser.
This indicates that the problem lies within the citrix environment. Somehow due to some policies or something unknown is blocking it to load & play the videos.
Error Loading media: File could not be played.
This error message is generic and be due to several issues such as HDX flash redirection, H.264 codec conversion failure etc. But in this scenario it was due to the following:
To reproduce the scenario, follow below steps on any XenApp server directly (RDP’ing):
- Open the website http://<cloud-hostedvideowebsite>/
- Go to IE Settings > F12 Developer Tools > Emulation tab
- Change Document Mode from Edge(default) to 8
The page will refresh (reset) automatically with IE 8 engines (don’t close the F12 panel)
Just click on any videos and it should play
Resolution & Workaround
Resolution (for webpage owner/developer)
Configure the webpage to restrict a it to a document mode (8 in this case) supported by an older version of Windows Internet Explorer. You need to consider the x-ua-compatible header, which allows a webpage to be displayed as if it were viewed by an earlier version of the browser. Please follow this MSDN library page titled Specifying legacy document modes for further steps on how to do it. May be it will be good if there can be a separate web-page hosting for Citrix environment, as the site works all OK in non-citrix environment.
Extract from one of the MS page: If you are using the X-UA-Compatible META tag you want to place it as close to the top of the page’s HEAD as possible. Internet Explorer begins interpreting markup using the latest version. When Internet Explorer encounters the X-UA-Compatible META tag it starts over using the designated version’s engine. This is a performance hit because the browser must stop and restart analyzing the content.
The best practice is an X-UA-Compatible HTTP Header. Adding the directive to the response header tells Internet Explorer what engine to use before parsing content begins. This must be configured in the web site’s server. Custom HTTP Headers can be added in Internet Information Server through the management console.
You can also add custom HTTP headers in the ASP.NET web.config:
<add name=”X-UA-Compatible” value=”IE=edge” />
HTTP Headers may also be added to the web application’s response by the application’s code. In ASP.NET custom headers can be added to the response using the AddHeader method. The following shows how to programmatically add the X-UA-Compatible header.
Workaround (for System Admins)
Open the browser in Enterprise Mode instead of the Standard Mode (default). To enable this, you need to configure a group policy (GPO) in Active Directory or in your computer’s Local Policy (if no AD infrastructure in-place). Follow the below steps to configure and enable the policy:
Turn on Enterprise Mode and use a site list
Open your Group Policy editor and go to the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list setting.
To get started with this policy, you need to create a site list using the Enterprise Mode Site List Manager tool which can be downloaded from the Microsoft download page here.
Add sites to the Enterprise Mode site list using the Enterprise Mode Site List Manager. To add a site to your compatibility list,
In the Enterprise Mode Site List Manager tool, click Add.
Type the URL for the website that’s experiencing compatibility problems, like <domain>.com or <domain>.com/<path> into the URL box. You don’t need to include the http:// or https:// designation. The tool will automatically try both versions during validation.
Pick Enterprise Mode if the site should use the new, modified browser configuration or pick Default IE if it should use the latest version of Internet Explorer.
Click Save to validate your website and to add it to the site list for your enterprise. If your site passes validation, it’s added to the global compatibility list. If the site doesn’t pass validation, you’ll get an error message explaining the problem. You’ll then be able to either cancel the site or ignore the validation problem and add it to your list anyway.
On the File menu, go to where you want to save the file, and then click Save to XML.
You can save the file locally or to a network share. However, you must make sure you deploy it to the location specified in your registry key.
This is how the XML file looks like:
Add the URL of the XML file to the GPO: Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list
You may save the XML file on a webserver (HTTP), network share or locally on any computer/server. As examples:
HTTP location: “SiteList”=”http://localhost:8080/sites.xml”
Local network: “SiteList”=”\\network\shares\sites.xml”
Local file: “SiteList”=”file:///c:\\Users\\<user>\\Documents\\testList.xml”
Once the GPO is applied, ensure you go to each of the XenApp servers and run ‘gpupdate’ to ensure the policy is propagated to the servers.
And in the registry on the XenApp server, you should see the following entry:
To verify the webpage opens in Enterprise mode, launch the IE as a published app and open the video-hosting webpage in question. Go to Tools > F12 Developer Tools, under Emulation tab, you should see the Document mode is set to 5(Default)