XenApp 6.5 – cloud-hosted WebM/MP4 videos may not work in Internet Explorer

Problem Description

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 Message

Error Loading media: File could not be played.

ctx_mp4_1

Cause

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:

Debugging

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

ctx_mp4_2

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.

ctx_mp4_3

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:

<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name=”X-UA-Compatible” value=”IE=edge” />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

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.

HttpContext.Response.AddHeader(“X-UA-Compatible”, “IE=edge”);

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.

ctx_mp4_4

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.

ctx_mp4_5

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.

ctx_mp4_6

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.

ctx_mp4_7

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:

ctx_mp4_8

Add the URL of the XML file to the GPO: Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list

ctx_mp4_9

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:

ctx_mp4_13

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)

ctx_mp4_12

Advertisements

About cloudray

Predominantly based around Virtualization, but will include other technology related information and anything else I find interesting and feel the need to share with you. I also use this Blog as both a place to store useful information that I think that will come in handy to me at some point in the future, and also a place to help aid my learning. I find a great way to learn about something is to research about it and then write it up in my own words. I'm Pushpal Ray, from India. As a certified VCP3/4/5 professional, I am currently working as an Independent Consultant. Over 10 years of IT-industry experience, currently focused around the Desktop Virtualization(End-User Computing). I also have extensive experience in Windows Administration, Datacenter Migration, Workload profiling & benchmarking. At my leisure, I enjoy hiking, running, photography, spend hours in my fav coffee shop & spend quality time with my wife. Occasionally, catch up with few friends for a drink!
This entry was posted in Enterprise Virtualization, XenApp and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s