Currently, it's possible to transparently set a cookie in the client’s browser to automatically enable “HTML5 mode” when visiting youtube.com. This can present a major advantage, since with the new HTML5 video content type it's easier to cache YouTube videos without any need for RTMP proxy or more complex CPL code.
This is a service provided by youtube.com and as such they may change it at any time. The “HTML5 mode” is still considered to be a trial and so we can expect this to change; in this case, the procedure described here may need updating or modification. However we do expect HTML5 to be more prevalent as time goes by, so this document provides a valid starting point. This document serves as a Proof of Concept of what the proxy can achieve if traffic patterns are observed.
Please read www.youtube.com/html5. Make a special note of which browsers currently support HTML5 and make sure clients are using a HTML5 capable browser. Also note that YouTube states:
“Videos with ads are not supported (they will play in the Flash player)”
This means that the same video may sometimes play in Flash because an ad will be displayed. Other times it will play in HTML5. There is no possibility in controlling this until YouTube enables HTML5 for their advertisements also.
Ensure that the proxy is intercepting HTTP traffic. Add the following CPL code to your local policy file (see comments inline):
;if the HTML5 preference cookie is not present, instruct the client to set this cookie
How can I tell if a specific video being played is actually using HTML5?
When viewing the video, right click on the video. If the video is using the normal Flash you will see a Flash context menu:
On the other hand, if the video is using HTML5, the menu will relate to HTML5:
How can we see the caching gains that HTML5 introduces?
This can be seen in the Active Sessions report on the ProxySG (Statistics > Sessions > Active Sessions). The first time a video is accessed in HTML5 you will see no gains; this is expected:
However, the second time a user requests this video, you should see 80-100% savings:
Note how the proxy is serving the object from cache.
-Even with the above CPL in place, browsers that do not support HTML5 will not break. They will simply fall back to the Flash Player.
-The first time a user requests a video in HTML5, there may be a longer delay than normal in serving the video than when accessing the video in Flash:
This is to be expected because the proxy is requesting the video from the server and must wait until it completely caches the object before serving it to the client. However, once past this stage, the video is fully buffered, as will be subsequent visits to the same video. The delay depends on the speed of the WAN link and the size of the video.
-Ensure that the Do not cache objects larger than setting is not set too low:
Some of these videos can get quite large, so make sure to find a balance between what you need to cache and what is considered too large to cache.
-This may change in the future, but until now streaming video remains using Flash or RTMP, so there are no splitting benefits or similar.
Imported Document ID: 000008738
Subscribing will provide email updates when this Article is updated. Login is required.
Thanks for your feedback. Let us know if you have additional comments below. (requires login)
Subscribed to the Article.
Unable to subscribe
Thanks for your additional feedback !!!
Enterprise Support Virtual Agent
Rate Me :
Tell us more:
Welcome! My name is Sami, the Enterprise Support Virtual Agent answering technical support questions.