Embedding Windows Media Player for all browsers

前端 未结 9 550
盖世英雄少女心
盖世英雄少女心 2020-12-01 03:55

We are using WMV videos on an internal site, and we are embedding them into web sites. This works quite well on Internet Explorer, but not on Firefox. I\'ve found ways to ma

9条回答
  •  误落风尘
    2020-12-01 04:36

    I found a good article about using the WMP with Firefox on MSDN.

    Based on MSDN's article and after doing some trials and errors, I found using JavaScript is better than using conditional comments or nested "EMBED/OBJECT" tags.

    I made a JS function that generate WMP object based on given arguments:

    
    

    Then I used that function by writing some markups and inline JS like these:

    You can use jQuery.ready instead of window load event to making the codes more backward-compatible and cross-browser.

    I tested the codes over IE 9-10, Chrome 27, Firefox 21, Opera 12 and Safari 5, on Windows 7/8.

提交回复
热议问题