`mplayer.getElementsByTagName("param")[1]` may now return undefined. can probably try `swfHTML = mplayer.querySelector('param')`