- Using HTML with Windows Media Player
- Overview
- Web Embedding
- Script Commands and URL Flipping
- Rich Media Streaming
- Browser Support
- Displaying Web Pages in the Full Mode of the Player
- HTML Quick Guide
- Quick guides
- Embedding Windows Media Player.
- Windows Media Player HTML5 Extension for Chrome
- Softonic review
- A Complementary Media Player
- To Play Online Videos
- Simple Video Player
- Windows Media Player HTML5 для Chrome.
- Расширение HTML5 для Windows Media Player и Firefox.
Using HTML with Windows Media Player
Overview
Using HTML with Windows Media Player is an excellent way to combine audio and video with text and graphics. You can embed the Windows Media Player control in a webpage when you want to supplement your static content or create Web applications with digital media. When you want to supplement your digital media with HTML, on the other hand, you can display webpages in the full mode of the Player by referencing them in Windows Media metafile playlists.
If you write custom programs that embed the Windows Media Player control in remote mode, you can also control the webpages displayed in the various panes of the full mode of the Player when your users undock the control. This lets you preserve continuity between the docked and undocked states.
Web Embedding
You can use the Windows Media Player control as part of a webpage you create. See Embedding the Windows Media Player Control in a Web Page.
Script Commands and URL Flipping
Script commands are text/value pairs you can embed in your digital media files or streams. You might use custom script commands solely to trigger script code, while letting Windows Media Player handle other script commands automatically.
When you have several webpages that accompany a digital media presentation, URL script commands can automatically change the page in one frame while the Windows Media Player control continues playing digital media in another frame. This is called URL flipping, and is an excellent way to create a multimedia slide show. Other automatically handled script commands let you switch playback to a different media file or stream, display captioning text, or trigger events such as ad insertions defined in a Windows Media metafile playlist.
For more information about URL flipping, see Creating Web-Based Presentations.
Rich Media Streaming
URL flipping works best with simple pages that load rapidly. With more complex pages, multiple components are transferred individually, making it difficult to synchronize page display with digital media. To allow complex rich media presentations, webpages can be added to a media stream and delivered to the Player in the same way as audio and video. This lets you synchronize the components of your presentation much more easily, especially over low-speed connections.
For more information about rich media streaming, see Creating Web-Based Presentations.
Browser Support
You can embed the Windows Media Player control in Microsoft Internet Explorer, Firefox, and Netscape Navigator, although the process is slightly different for each. You can also create webpages designed to work with all three browsers.
With Internet Explorer and Firefox, you embed the control using the HTML OBJECT element. Navigator requires a different approach, however, because it doesn’t directly support ActiveX controls. With Navigator, you use the APPLET element to embed a special Java applet into the page. This applet handles communication with the Player ActiveX control.
For more information about Netscape Navigator support, see Using Windows Media Player with Netscape 7.1.
Displaying Web Pages in the Full Mode of the Player
You can extend the functionality of Windows Media Player or provide a custom view of information that accompanies your digital media by displaying webpages in the full mode of the Player. This is the HTMLView feature of Windows Media metafiles. Metafiles give you great control over playlist content, allowing you to seamlessly transition between clips, insert advertisements, and display still images in Windows Media Player. To display webpages in the full mode of the Player, you use the PARAM element to add URL references to your playlist entries or to entire playlists.
For more information about using webpages in metafiles, see Displaying Web Pages in Windows Media Player.
HTML Quick Guide
Quick guides
Embedding Windows Media Player.
Windows media player (7.0 and higher) code (For IE and Firefox)
Windows media player (6.4) code
Parameters
Name | Type | Description |
AutoSize | Boolean | This property specifies or retrieves a value indicating whether the Windows Media Player control automatically resizes to accommodate the current media item at the size specified by the DisplaySize property. |
AutoStart | Boolean | If this value is set to true/1, the video will begin playback as soon as it has buffered. Otherwise it will wait for the user to press Play. |
Balance | Integer | Controls the left/right stereo balance of any audio. -10000 is 100% left speaker, 10000 is 100% right speaker, and 0 is perfectly balanced. |
DisplaySize | Integer | This property specifies or retrieves a value indicating whether the Windows Media Player control automatically resizes to accommodate the current media item at the size specified by the DisplaySize property.
|
FileName/Url/src | String | The URL of the file to play. |
Height | Integer | Defines the height of the displayed object in pixels. |
Mute | Boolean | If Mute is enabled (true/1), the sound is disabled. The volume parameter is ignored. |
PlayCount | Integer | Controls the number of times the file is played. A value of 0 repeats forever. Default is one. |
Rate | Double | This property acts as a multiplier value that allows you to play a clip at a faster or slower rate. The default value of 1.0 indicates the authored speed. Note that an audio track becomes difficult to understand at rates lower than 0.5 or higher than 1.5. A playback rate of 2 equates to twice the normal playback speed. |
ShowAudioControls | Boolean | If this value is set to true/1, the audio controls will be shown. |
ShowControls | Integer | If this value is set to true/1, the video transport controls will be shown (play, stop, pause, etc). If it is set to false/0, the controls will not be shown and the user will not be able to control playback at all. Obviously, in this case you would need to have autostart enabled or there will be no way to play the video. Height: 46 pixels |
ShowDisplay | Boolean | When set to true/1, this displays information such as the title and artist of the clip. Height: 74 pixels |
ShowStatusBar | Boolean | If this value is set to true/1, the status bar is shown. This includes the buffering progress and playback status of the clip. Showing the status bar is a good idea as it shows the user how long they have to wait before the clip will be ready for playback Height: 26 pixels |
ShowTracker | Boolean | If this value is set to true/1, the tracker is shown. |
StetchToFit | Boolean | The stretchToFit property specifies or retrieves a value indicating whether video displayed by the Windows Media Player control automatically sizes to fit the video window, when the video window is larger than the dimensions of the video image. |
TransparentAtStart | Boolean | Specifies whether to make the player transparent at the start of the play. Default is false. |
Volume | Integer (-3400 till 0) | Sets the audio volume (Loud=0) |
Width | Integer | Defines the width of the embedded object in pixels. |
Note 1:
Use true or false for the tag, 1 or 0 for the tag.
Note 2:
Windows Media Player 6, clsid:05589FA1-C356-11CE-BF01-00AA0055595A
Windows Media Player 6.4, clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95
Windows Media Player 7, 9 and 10, clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6
Note 3:
The tag is not approved by W3C. However you need this tag to make the code work for the Firefox browser.
Windows Media Player HTML5 Extension for Chrome
Softonic review
A Complementary Media Player
Windows Media Player HTML5 Extension for Chrome is an add-on and tool created by Microsoft Open Technologies. The browser add-on and tool enables viewing of video files found on specific websites.
To Play Online Videos
Windows Media Player HTML5 Extension for Chrome is built for playing video files that may require a special kind of media player. Sometimes an online video may ask for permission such as ‘Windows Media Player is required to display some elements on the page”. A conventional method like directly opening them online is not reliable because some browsers lack the necessary reader or capability to read special formats. Updating the browser may take time in order to read new video formats. Everyone will have a peace of mind whenever they watch online videos No pop-ups will interrupt users attempting to open an online video. This is very ideal for playing podcasts and other types of videos. The add-on and tool is only designated for Google Chrome. Installation of the add-on is simplified into a drag-and-drop procedure. It is able to read online videos in MP4 format. MP4 is a common and standard video format widely used today. It also allows playback of videos coming from other Windows Media Player contents for other browsers as well. It also accepts H.264 encoded videos available in HTML5 webpages. This is perfect for Google Chrome has departed from supporting the native H.264 video format and the add-on can alleviate that minor problem. Reading H.264 encoded videos involves scanning and replacing of the video tags with this add-on and tool. The video tag replacement is only available if the video format is compatible with Windows Media Player. Users must remember that this add-on and tool lacks customization options compared to others.
Simple Video Player
Windows Media Player HTML5 Extension for Chrome has a single job to play video files. Users can enjoy their videos whether they are MP4 or H.264. It has a simple functionality, at the same time consumes little system resource.
Windows Media Player HTML5 для Chrome.
Объявление, что Google удалит встроенную поддержку воспроизведения H.264 вызвало настоящий скандал в Интернете (см. статью H.264 поддержка в Google Chrome ). Google Chrome до этого момента был веб-браузером, который поддерживает H.264, Theora и WebM8 видео. Были сформированы два лагеря браузера. С одной стороны, Google Chrome, Mozilla Firefox и Опера, которые поддерживают Webm8 (VP8) и Theora видео, с другой стороны Microsoft Internet Explorer и Safari которые поддерживают H.264 видео. Microsoft`s Internet Explorer кроме того, поддерживает VP8 видео, если VP8 кодек установлен на компьютере.
Microsoft недавно создал расширение для браузера Firefox, которое добавляет поддержку H.264 видео в браузере (см. статью HTML5 расширение для Windows Media Player Firefox). расширение использует встроенные возможности операционной системы Windows 7, чтобы добавить поддержку H.264 видео в Firefox.Microsoft, взаимодействует с лабораторий Центра и теперь выпустило аналогичное расширение для веб-браузера Chrome от Google. Расширение совместимо с Google Chrome 8 или более поздней версии и операционной системой Windows 7.
Расширение основано на расширении Chrome, которое анализирует HTML5 страниц и заменяет видео теги с помощью вызова Windows Media Player Plug так, что содержание может быть воспроизведено в браузер. Расширение заменяет видео теги, только если видео форматы, указанны в тегах среди тех, которые поддерживаются Windows Media Player. Тэги, которые содержат другие форматы видео не коснулись.
Расширение также проверяет версию браузера поддерживает MP4 (H.264) видео кодек или нет .Текущая версия расширения по-прежнему использует Windows Media Player Plug в API-интерфейсе для управления воспроизведением видео, поэтому есть некоторые различия между методами и свойствами, определёнными в новых HTML5 стандартах, которые доступны в Windows Media Player Plug. Google пользователи Chrome, работающие с Windows 7, которые хотят поддержку H.264 в своём веб-браузере могут загрузить и установить расширение по следующей ссылке Windows Media Player HTML5 Extension for Chrome .
Расширение HTML5 для Windows Media Player и Firefox.
Существует еще некоторая путаница с HTML5 видео форматом и какой браузер его поддерживает. Mozilla Firefox, например, не поддерживает формат H.264 видео, что означает, что пользователи, которые сталкиваются с видео кодируется в формате который они не смогут просмотреть в браузере, если сайт, который предлагает им видео кодек WebM, который также не поддерживается веб-браузером. Но если нет резервной копии ,то это означает, что видео не может быть воспроизведено в Firefox. С точки зрения пользователя — это проблема. Расширение HTML5 для Windows Media Player Firefox от Microsoft пытается добавить поддержку H.264 видео в Firefox. Плагин для браузера работает только в Firefox 3.6 или более поздней версии и только под операционной системой Windows 7. Другими словами, пользователи Windows 7 с Firefox 3.6 и выше могут использовать плагин, все остальные не смогут.
Но что именно делает дополнение?
Расширение основано на дополнении Firefox которое анализирует HTML5 страницы и заменяет видео теги с помощью вызова Windows Media Player Plug так, что содержание может быть воспроизведено в браузере. Дополнение на заменяет видео теги, только если видео форматы, указанных в теге среди тех, которые поддерживаются Windows Media Player. Тэги, которые содержат другие форматы видео не воспроизводятся.Дополнение работает на большинстве страниц, которые пытаются играть видео H.264, но не на всех. Microsoft объясняет проблемы, которые могут возникнуть следующим образом:
В некоторых случаях Firefox может не проигрывать видео, даже если добавлены и установлены правильно кодеки потому, что страницы могут использовать вызов canPlayType, чтобы определить, может ли браузер играть содержание H.264. Обычно проверка производится либо с помощью CreateElement (‘видео’) или GetElementsByTagName («видео»), а затем вызывает canPlayType (‘video’mp4’). В обоих случаях вызов будет возвращать пустую строку, даже если в браузере установлен проигрыватель H.264 видео.
Пользователи Firefox, которые хотят смотреть закодированное видео H.264 могут попробовать добавить для этого расшиерние. Другим вариантом было бы, чтобы перейти к веб-браузеру с поддержкой H.264, который также является единственным вариантом для не Windows 7 пользователей Firefox, по крайней мере на данный момент времени.