views:

49

answers:

0

I use the following html to show media player on the web-page rendered in IE 8:

<OBJECT type="application/x-ms-wmp" classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="200" height="200">

After starting playback the size of the control stays the same.

However, when I create the control dynamically in JavaScript, after starting the video the control increases to the size of the video. Here is the code:

player = document.createElement('object');
player.setAttribute("classid", "CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6");
player.setAttribute("type", "application/x-ms-wmp");
player.setAttribute("width", "200");
player.setAttribute("height", "200"); 

Is it a bug or am I missing something? How can I preserve the same size of the video as the original size of the control?

Thank you.

P.S. Btw, if I set control's attributes in JavaScript in different order ("classid" after "type"), then control does not render. Do you know what might be a problem.