Tuesday, March 19, 2013

Desktop App for YouTube with embedded videos

In this and this blog entry I talked about Desktop App for YouTube. However in that variant the videos are shown in a separate window. This has to do with the fact that the webview tag cannot show embedded videos in the current stable version of Chrome. However the webview tag in Chrome Canary can show embedded videos. With that I managed to get embedded videos in Desktop App for YouTube that only works with Chrome Canary. Here is the screenshot:

Also added support to popout the video. This basically answers the question someone asked here.You can further make it full screen using the built in control.

Available on Chrome web store.

While implementing this I ran into CSP limitations and capabilities and limitation of embedded sandboxed iframe and webview tags. I got around those issues by using absolute positioning and z-index to position webview at the exactly right sub-rectangle if sandboxed iframe.

No comments: