View Full Version : How to render video in layout panels

15 Oct 2010, 8:28 AM

I hv problem in rendering youtube video.

1. I use border layout, I hv rendered a tree panel to d west & 2 empty panels in center(panel1 & panel2)
2. When I click trees leaf, I rendered a template with youtube URL, in panel1

Now what I need is

When I click d youtube link in panel1, I should get a youtube video on panel2

could anyone help me with dis...............

15 Oct 2010, 12:14 PM
Youtube shows you how to do it.

You just need to convert their suggested markup into the bodyCfg of a Panel:

new Ext.Window({
title: 'Truck hitting my arm',
width: 650, height: 400,
bodyCfg: {
tag: 'object',
cn: [{
tag: 'param',
name: 'movie',
value: 'http://www.youtube.com/v/HvWEj1asOlQ?fs=1&hl=en_GB'
}, {
tag: 'embed',
src: 'http://www.youtube.com/v/HvWEj1asOlQ?fs=1&hl=en_GB',
type: 'application/x-shockwave-flash'
onBodyResize: function(w, h) {
this.constructor.prototype.onBodyResize.apply(this, arguments);
var size = { width: w, height: h };
Ext.apply(this.body.dom, size);
Ext.apply(this.body.dom.childNodes[1], size);