- Windows Media Player для Windows
- Основные возможности программы
- AxWindowsMediaPlayer Object (VB and C#)
- Embedding the Windows Media Player Control in a Visual Basic .NET Solution
- Add the Video Window
- Add Two Buttons and Adjust the Form
- Add the Play Code
- Add the Stop Code
- Add Error-handling
- Using the Windows Media Player Control in a C++ Program
- Windows Media Player SDK
Windows Media Player для Windows
|
| |
Версия | Платформа | Язык | Размер | Формат | Загрузка | |
---|---|---|---|---|---|---|
| Windows | Русский | 25,7MB | .exe | ||
* скачайте бесплатно Windows Media Player для Windows, файл проверен! |
Windows Media Player (Виндовс медиаплеер) – проигрыватель видео и аудио файлов, входящий в состав операционных систем семейства Windows. На сегодняшний день бесплатно распространяется компанией Microsoft. Поддерживает подключение дополнительных плагинов, таких, как:
- AC3filter – обеспечивает поддержку многоканального звука, а также выходы S/PDIF. Кроме того, декодирует в режиме реального времени аудиоформат AC3/DTS;
- Xiph.org – предназначен для работы с форматами FLAC, а также Ogg Vorbis, Speex, Theora;
- WMP Tag Pius – плагин, с помощью которого подключаются библиотеки для интеграции в проигрыватель дополнительных форматов: FLAC, Ogg Vorbis, Monkey’s Audio, MPEG-4, Musepack.
Впервые программа появилась в Windows 98 Second Edition. При первой установке медиапроигрыватель проверяет подлинность лицензионной копии операционной системы Windows.
Основные возможности программы
Кроме воспроизведения медиафайлов, программа умеет приобретать в сети платный контент, производить синхронизацию с другими устройствами, например, MP3-плеером, а также проигрывать аудио и видео из iTunes. Помимо этого, Windows Media Player умеет:
- Воспроизводить мультимедийные файлы локально или в потоковом режиме в большинстве популярных форматов;
- Проигрывать DVD, CD или VCD диски;
- Работать с титрами и текстами песен (опционально);
- Просматривать в сети ТВ-каналы и прослушивать FM-радио;
- Импортировать, экспортировать и создавать плейлисты форматов: .asx, .wax, .m3u, .wmx, Search-MS, .wpl, а также изменять их параметры;
- Выводить подробную информацию о воспроизводимом файле – формат, путь размещения, жанр, альбом, исполнитель или композитор. Может отыскать более детальную информацию, воспользовавшись выходом в интернет;
- Записывать с заданной скоростью DVD и CD диски, а также копировать содержимое с музыкальных компакт-дисков в форматах MP3 или WMA\WAV с выбором качества звучания от 48 до 192 кб. Есть возможность установить защиту от копирования;
- Воспроизводить медиаконтент с локального компьютера на удаленный ПК или мобильное устройство;
- 10-полосный графический эквалайзер с поддержкой предустановленных пресетов, к примеру, «Рок» или «Классика».
Последняя на сегодняшний день версия имеет индекс 12 и была выпущена в 2017 году.
AxWindowsMediaPlayer Object (VB and C#)
The AxWindowsMediaPlayer object is the root object for the Windows Media Player control. It supports the properties, methods, and events listed in the following tables.
The AxWindowsMediaPlayer object supports the following properties.
Property | Description |
---|---|
cdromCollection | Gets an IWMPCdromCollection interface. |
closedCaption | Gets an IWMPClosedCaption interface. |
Ctlcontrols | Gets an IWMPControls interface. |
Ctlenabled | Gets or sets a value indicating whether the Windows Media Player control is enabled. |
currentMedia | Gets or sets the IWMPMedia interface that corresponds to the current media item. |
currentPlaylist | Gets or sets the current IWMPPlaylist interface. |
dvd | Gets an IWMPDVD interface. |
enableContextMenu | Gets or sets a value indicating whether to enable the context menu, which appears when the right mouse button is clicked. |
Error | Gets an IWMPError interface. |
fullScreen | Gets or sets a value indicating whether video content is played back in full-screen mode. |
isOnline | Gets a value indicating whether the user is connected to a network. |
isRemote | Not supported for .NET programming. |
mediaCollection | Gets an IWMPMediaCollection interface. |
network | Gets an IWMPNetwork interface. |
openState | Gets a value indicating the state of the content source. |
playerApplication | Not supported for .NET programming. |
playlistCollection | Gets an IWMPPlaylistCollection interface. |
playState | Gets a value indicating the state of the Windows Media Player operation. |
settings | Gets an IWMPSettings interface. |
status | Gets a value indicating the current status of Windows Media Player. |
stretchToFit | Gets or sets a value indicating whether video will stretch to fit size of the Windows Media Player control video display. |
uiMode | Gets or sets a value indicating which controls are shown in the user interface when Windows Media Player is embedded in a webpage. |
URL | Gets or sets the name of the clip to play. |
versionInfo | Gets a value that specifies the version of the Windows Media Player. |
windowlessVideo | Gets or sets a value indicating whether the Windows Media Player control renders video in windowless mode. |
The AxWindowsMediaPlayer object supports the following methods.
Method | Description |
---|---|
close | Releases Windows Media Player resources. |
launchURL | Sends a URL to the user’s default browser to be rendered. |
newMedia | Returns an IWMPMedia interface for a new media item. |
newPlaylist | returns an IWMPPlaylist interface for a new playlist. |
openPlayer | Opens Windows Media Player using the specified URL. |
The AxWindowsMediaPlayer object supports the following events.
Embedding the Windows Media Player Control in a Visual Basic .NET Solution
To use the functionality of Windows Media Player 9 Series or later in a Visual Basic .NET application, first add the component to a form as described in Using the Windows Media Player Control with Microsoft Visual Studio
This section describes how to create an application that plays video and has custom play and stop buttons.
Add the Video Window
Add the Windows Media Player control to a form. Resize the control, and then place it where you want the video window to appear.
Select the Windows Media Player control, then change the uiMode property to «none». This setting hides the UI controls. When the user plays a video, it will appear in the window. For audio-only content, a visualization will appear.
Add Two Buttons and Adjust the Form
Now add two buttons to the form. Select the first button and change the Text property to «Play». Select the second button and change its Text property to «Stop».
Add the Play Code
Double-click the Play button to reveal the Code window. The following code is displayed:
Add this line to the subroutine:
In the preceding code example, «axWindowsMediaPlayer1» is the default name of the Windows Media Player control and «c:\mediafile.wmv» is a placeholder for the name of the media you want to play.
If you have added the digital media content from the Windows Media Player SDK to the library in Windows Media Player, you can use this code instead:
Because the autoStart property is true by default, Windows Media Player will start playing when you set the currentPlaylist or URL property.
Add the Stop Code
Double-click the Stop button to reveal the Code window. The following code is displayed:
Add this line to the subroutine:
The managed-code wrapper for the Windows Media Player control exposes the Controls object as Ctlcontrols to avoid collision with the Controls property inherited from System.Windows.Forms.Control.
Add Error-handling
The Windows Media Player control does not raise an exception when it encounters an error such as an invalid URL. Instead, the control signals an event. Your application should handle error events sent by the Player.
To create an event handler, open the code window for your form class. From the drop-down list at the top of the window, select the Windows Media Player control. A list of events appears in the drop-down list to the right. From that list, select MediaError. The following code is displayed:
The following code could be inserted in the subroutine to provide minimal error-handling capability. Note that information about the error can be retrieved from the _WMPOCXEvents_MediaErrorEvent argument.
Using the Windows Media Player Control in a C++ Program
Using C++ to embed the Windows Media Player control is supported for Windows Media Player 9 Series or later.
There are several different ways to use the Windows Media Player control in a C++ program. You can create an instance of the control in a console application, or you can embed the control in a Windows application. Also, you can implement interfaces that enable you to run an embedded Player control in remote mode. You can customize the user interface of an embedded control by applying a skin definition file.
This information is described in the following topics.
Topic | Description |
---|---|
Using the Windows Media Player Control in a Console Application | Describes a simple C++ console application that instantiates the Windows Media Player control to display the version. |
Hosting the Windows Media Player Control in a Windows Application | Describes how to use the ATL ActiveX host window to embed the Windows Media Player control in a Windows program. |
Remoting the Windows Media Player Control | Describes how to embed the Windows Media Player control in a C++ program in remote mode, which lets your users undock the control to switch to the full mode of the Player. |
Handling Events in C++ | Describes how to receive event notifications from Windows Media Player. |
Using Skins with the Windows Media Player Control | Describes how to apply a skin file to a Windows Media Player control embedded in a C++ program. |
You can embed the Windows Media Player 10 Mobile control in a Windows CE application. The techniques you use to do this are similar to those used with the desktop Windows Media Player control. However, there are differences between ATL for Windows and ATL for Windows CE. This documentation describes the differences between these implementations, where appropriate.
Windows Media Player SDK
This documentation describes the Microsoft Windows Media Player Software Development Kit (SDK). The Windows Media Player SDK is one of the components of the Microsoft Windows SDK. Other media components include the Microsoft Media Foundation SDK, the Microsoft Windows Media Format SDK, and the Microsoft Windows Media Services SDK.
The Windows Media Player SDK documents programming technologies that can be used to extend the capabilities of Windows Media Player and Windows Media Player Mobile. These technologies are documented in the following sections:
Section | Description |
---|---|
About the Windows Media Player SDK | This section provides details about how to find specific information in the SDK. It includes a section about new features and information about how to use the samples included with the SDK. |
Windows Media Player Object Model | The Microsoft Windows Media Player control is a Microsoft ActiveX control used for adding digital media playback capabilities to webpages. It provides a programming interface for rendering digital media files and streams. |
Windows Media Player Skins | Skins are an XML-based technology used to customize the user interface of Windows Media Player. You can also use Windows Media Player Mobile skins to customize the user interface of Windows Media Player Mobile. |
Windows Media Player Plug-ins | Plug-ins are objects that extend Windows Media Player functionality in a variety of ways. Plug-in types include custom visualizations, user interface plug-ins, DSP plug-ins, and rendering plug-ins. Windows Media Player Mobile plug-in support is also described in this section. |
Windows Media Metafiles | Windows Media Metafiles are XML documents that provide information about a media item and its presentation. Metafiles can be used to organize media items into playlists that can include functionality for seamless stream switching, ad insertion, and other features. |
Windows Media Playlists | Playlists are files that use XML elements to define either a dynamic «smart» playlist of media items or a static set of media items. |
Windows Media Player Online Stores | Windows Media Player provides functionality that enables digital media content providers to integrate their services with Windows Media Player. Integration between the Player and an online digital media store enables the user to locate content, download and manage files, play content, and copy content to CDs or devices. |
Windows Media Player | Some features of the SDK apply to Windows Media Player, the Windows Media Player ActiveX control, and Windows Media Player Mobile. This section provides information about these features. |
Glossary | This section contains definitions of terms used throughout the SDK. |
Installing the Windows SDK does not install Windows Media Player or Windows Media Player Mobile. You must have Windows Media Player installed to use the material in this SDK. Windows Media Player Mobile is a part of Windows Mobile, which is available only on a Pocket PC or Smartphone supplied by a device manufacturer or mobile operator.