I got one plugin and embeded to my webpage page, the plugin is used to play media files(.mp3,mp4,m3u8, etc).my webpage looks like:
<div id='div1'>Plugin</div>
<div id='div2'><div id='div2sub'></div></div>
Plugin created like
<object id='plugin' type='xxxx' width='xxxx' height='xxxx'></object>
the problem is: when i move plugin from div1 to div2sub like:
var x = document.getElementById('plugin');
var y = document.getElementById('div2sub');
y.appenChild(x);
then I find the result IE: the plugin still playing media file, video, audio output,it works fine(ActiveX plugin) Chrome and FireFox: No video, audio output,plugin not play media file anymore.(npapi Plugin)
I found the reason is: with IE, the Plugin just moved,not destroy then recreate, with chrome and FireFox,the plugin was destroy then recreated, I have one function to register callback event on pluin, chrome console shows my plugin never received callback event, so media file can't be played.
My question is: Is there anyway I can do just move plugin, and the plugin will not be destroyed and recreated with chrome and FireFox, just works like with IE.
Thanks for help...