User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20070515 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20070515 Firefox/22.214.171.124 in my page, i put in a document.write for <object>, and it wouldn't display anything when i clicked on the trigger. I checked the error console, nothing happened. I put in a document.write for <embed> instead, and the object flashed. it started playing for one sec then disappears. In IE, it shows, plays, but when i move out of the player, it stops. Reproducible: Always Steps to Reproduce: 1. go to a site with embed in a document.write 2.it will flicker once 3. Actual Results: the box flickers Expected Results: start playing, still play when i move my mouse to somewhere else
Can you provide a testcase? Note that the correct way to invoke plug-ins in IE and Mozilla differ, see http://developer.mozilla.org/en/docs/Using_the_Right_Markup_to_Invoke_Plugins for more details.
Henry, you may want to also look at Using Web Standards in your Web Pages Section 126.96.36.199 What if I use <embed> for flash or for a video? http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages#What_if_I_use_.3Cembed.3E_for_flash_or_for_a_video.3F and also at Video or audio does not play http://kb.mozillazine.org/Video_or_audio_doesn't_play
doesn't work with objects either: var a ='<object type="video/x-ms-wmv" data="HKSAR10.wmv" width="330" height="270"><param name="movie" value="HKSAR10.wmv"><param name="autostart" value="true"><param name="controller" value="true"></object>' document.write(a); (that var script is all one line)
Henry, 1- We have to see the whole code; best is to upload a reduced testcase (like Gavin asked you) and give an URL so that we can examine the webpage. 2- We don't know if (and how) you open the document stream for that write and if you close it. E.g.: (...) document.open(); document.write(a); document.close(); Anyway, why do you need to embed dynamically such code... why not just declare your <object ...> in the document? What I mean here is why write that HTML code dynamically? 3- We don't know if you have the WMP plugin for Firefox installed. Go to http://support.mozilla.com/kb/Windows+Media+Player and then to http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx but make sure you download and install wmpfirefoxplugin.exe (318 904 bytes) and that you have+use WMP 11 http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx 4- Your code, as written, does not escape backslashes... you need to fix this: var a ='<object type="video\/x-ms-wmv" data="HKSAR10.wmv" width="330" height="270"><param name="movie" value="HKSAR10.wmv"><param name="autostart" value="true"><param name="controller" value="true"><\/object>' Common HTML Validation Problems Writing HTML in a SCRIPT Element http://www.htmlhelp.com/tools/validator/problems.html.en#script (English) http://www.htmlhelp.com/tools/validator/problems.html#script 5- Instead of <param name="movie" value="HKSAR10.wmv"> please try <param name="src" value="HKSAR10.wmv"> if the above 4 items did not work. 6- My reduced testcase: http://www.gtalbot.org/BugzillaSection/Bug374183PlayingVideoWithWindowsMediaPlayer11.html loads and plays (MIME type is video/x-ms-wmv). Regards, Gérard
it in a function command that writes the video when I click a button.
Workaround: document.body.innerHTML = a; document.body.innerHTML = a; You need to declare twice or bug 419251 happens. THIS IS NOT A DUPLICATE OF BUG 419251 BUT THE WORKAROUND CAUSES ANOTHER BUG WHICH IS FIXED BY DUPLICATING THE COMMAND.
Version: unspecified → 2.0 Branch
I've tested it using the w3c validator. In XHTML I can't have it but in HTML 4 I need it for it to validate. I'll try using d.open and d.close.
Created attachment 306435 [details] testcase three
Attachment #306434 - Attachment is obsolete: true
I know the problem of the page now. Firefox 2.0 just doesn't seem to "flush" some commands to the page without document.close(); or declaring twice. Not escaping / works if it was escaped in both firefox 2 and 3 just for this document. The language attribute is not a problem when I have HTML 4 trans and it works the same in firefox 2 and 3 with / without it. (well maybe just LOOKS)
I'm moving this to HENDRIX
I still don't know why embed elements will show for a second and revert but objects do nothing without document.close()!
Status: UNCONFIRMED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.