0
 <html> 
<head> 
  <title>so-wmp</title> 
  <script> 

    onload=function() { 
      player = document.getElementById("wmp"); 
      player.URL = "test.mp3"; 
    }; 

    function add(text) { 
      document.body 
        .appendChild(document.createElement("div")) 
        .appendChild(document.createTextNode(text)); 
    }; 

    function handler(type) { 
      var a = arguments; 
      add(type +" = "+ PlayStates[a[1]]); 
    }; 

    // http://msdn.microsoft.com/en-us/library/bb249361(VS.85).aspx 
    var PlayStates = { 
       0: "Undefined", // Windows Media Player is in an undefined state. 
       1: "Stopped", // Playback of the current media item is stopped. 
       2: "Paused", // Playback of the current media item is paused. When a media item is paused, resuming playback begins from the same location. 
       3: "Playing", // The current media item is playing. 
       4: "ScanForward", // The current media item is fast forwarding. 
       5: "ScanReverse", // The current media item is fast rewinding. 
       6: "Buffering", // The current media item is getting additional data from the server. 
       7: "Waiting", // Connection is established, but the server is not sending data. Waiting for session to begin. 
       8: "MediaEnded", // Media item has completed playback. 
       9: "Transitioning", // Preparing new media item. 
      10: "Ready", // Ready to begin playing. 
      11: "Reconnecting" // Reconnecting to stream. 
    }; 

  </script> 
  <script for="wmp" event="PlayStateChange(newState)"> 
    // http://msdn.microsoft.com/en-us/library/bb249362(VS.85).aspx 
    handler.call(this, "playstatechange", newState); 
  </script> 
</head> 
<body> 
  <div id="page"> 
    <object id="wmp" 
       classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" 
          type="application/x-oleobject"> 
    </object> 
  </div> 
</body> 
</html> 
4

1 回答 1

0

.mov文件是 QuickTime 文件。Windows Media Player 无法播放开箱即用的 QuickTime 文件。

QuickTime 是 Apple 创建的应用程序。Windows Media Player 是 Microsoft 创建的应用程序。对它们不能立即兼容感到惊讶吗?你不应该。

解决方案:正如@Andrew Bullock评论的那样,不要尝试将它们一起使用(至少在浏览器中)。使用不同的播放器或不同的多媒体格式。

于 2010-10-07T14:02:49.967 回答