Windows Media Player for Mac Guide for Internet Content Providers
Jim Travis
Microsoft Corporation
November 2003
Applies to:
Microsoft® Windows Media® Player for Mac OS X
Microsoft Windows Media Player 9 for Mac OS X
Introduction
If you author digital media content for the Internet that includes Windows Media®-based content, you want to make sure your work can be viewed by as wide an audience as possible. To help
you reach more people, Microsoft® offers a version of Windows Media Player for Macintosh computers, which includes a plug-in for Internet browsers. By carefully crafting your Web page to
support Macintosh users, you can increase the number of people who visit your site to enjoy your content.
Feedback
E-mail us with your comments and feedback
about this article.
Abstract
There are important issues to consider when using Microsoft Windows Media technologies to create Internet content that will be available to Macintosh users. This document details
what you need to know about making your digital media content work on the Macintosh platform.
For detailed information about using the Windows Media Player plug-in and the Windows Media Player for Mac object model, see the Windows Media Player 6.4 Software Development Kit (SDK) on the
Microsoft Web site.
This article details what you need to know about creating content that works well on the Macintosh platform. This article covers the following topics:
Using Playlists. Provides information about writing playlists for the Macintosh platform.
Logging.Describes how Windows Media Player for Mac handles logging requests.
Embedding the Player in a Web Page. Details the issues involved with embedding the Player in a Web page, including detecting
whether the Player has been installed on the client computer.
Script Commands. Describes the supported script commands in Windows Media files.
Closed Captions. Describes issues with displaying closed captions in an embedded Windows Media Player.
Windows Media Rights Manager. Provides information about configuring servers to support digital rights management on Macintosh
clients.
Windows Media metafiles are a powerful way to create playlists to control and customize digital media content. This section outlines what you need to know to write playlists that function properly
when parsed by Windows Media Player for Mac.
General Information
The following information will help you author playlists that perform well with Windows Media Player for Mac.
Extensions.Windows Media files with .asx extensions that have had their file name extensions changed to .asf will not play on the Macintosh. Be sure to label your files
appropriately.
Protocols.Instead of linking directly to a digital media server by using the Microsoft Media Server (MMS) protocol from a Web page, you should create an .asx file that
redirects traffic to the server, and link to the .asx file. Windows Media Player for Mac does not provide protocol handlers.
Dynamic Playlists
You can create Windows Media playlists dynamically by making requests to Active Server Pages (ASP) or Common Gateway Interference (CGI) scripts in your Windows Media metafiles; Windows Media
Player for Mac supports this process. The following list includes some issues to consider when creating your dynamic playlist:
Large dynamic playlists.Client-side playlists that contain an unusually large number of entries may perform poorly on the Macintosh.
Cookies.You cannot use Microsoft Internet Explorer cookies for query data when generating a playlist.
Numbers in the URL.Be careful how you use numbers in your URL paths. If you include a URL that contains floating-point values, and you also fail to provide a file name
extension and a question mark query separator, the Player will treat the URL as an IP address.
Redirection.If you use HTTP 301 (Moved Permanently) or HTTP 302 (Moved Temporarily) redirection, be sure your content type remains consistent. For example, if you use
HTTP 302 redirection from a link to a file with an .asx file name extension, be sure to respond with the URL of an .asx playlist. Failure to maintain consistent content types may yield unexpected
results.
Note: Proxy redirection is not supported (HTTP 305).
Support for International Character Sets
Windows Media Player for Mac requires that .asx files use the ISO-Latin-1 character set. You should avoid using the MacRoman character set and extended characters such as double-byte character
sets. Failure to use the ISO-Latin-1 character set may yield unexpected results.
Playlist Elements
The following Windows Media metafile elements are not supported by Windows Media Player for Mac:
Windows Media Player for Mac always returns its client IP address (c-ip) as "0.0.0.0". The globally unique identifier (GUID) of the Player (c-playerid) is generated per-session by using the
Anonymous approach. The Player will return the following GUID:
{3300AD50-2C39-46c0-AE0A-xxxxxxxxxxxx}
where "xxxxxxxxxxxx" represents a random number that changes for each new session of the Player.
Windows Media Player for Mac includes a plug-in for Internet browsers. The Windows Media plug-in lets you embed and script Windows Media Player for Mac by using the Windows Media Player 6.4
object model. The Windows Media plug-in supports a subset of the most commonly used properties, methods, and events from the 6.4 object model.
Internet Explorer 5 for Mac no longer supports Microsoft ActiveX® controls. And Internet Explorer for Mac does not support scripting to a plug-in. Therefore, you can embed Windows Media
Player for Mac in your Web page by using the Windows Media plug-in, but Internet Explorer for Mac cannot script to the plug-in. Keep this in mind when authoring your HTML document.
An example of how to embed Windows Media Player for Mac in a Web page is available on the MSDN Web site.
General Information
The following information will help you write HTML documents that perform well when embedding Windows Media Player for Mac in a Web page.
Plug-in TYPE.Pay close attention to the value of the TYPE attribute in the <EMBED> tag when embedding the Player. This value must read:
"application/x-mplayer2"
Use this value exactly as it appears.
BaseURL.When you specify a base URL, avoid using a relative URL to access a parent directory. Instead, specify the BaseURL value to be the URL of the highest-level
directory. Each relative URL can then be specified by its relationship to the parent directory.
MIME type.Be sure to configure your server to provide the correct MIME type for your content.
Full-screen mode.Users cannotswitch to a full-screen display from an embedded Player on a Macintosh computer. If you want users to be able to view your content
in full-screen mode, provide a link from your Web page directly to an .asx file. This will cause the stand-alone Player to launch and start the playlist.
Netscape 6.The Netscape 6 browser is not supported.
Internet Explorer 4.5 for Mac.Specifying a value for the SRC attribute within an <EMBED> tag that refers to a URL using the MMS protocol will result in
an error. Instead, point to an .asx file, and encourage users to upgrade their browser software to Internet Explorer 5 for Mac. Alternatively, use the FileName attribute. Using the
SRC attribute to open digital media files using the MMS protocol might yield unexpected results.
Object Model
For complete information about the Windows Media Player 7 for Mac object model, see the Windows Media Player 6.4 SDK on the MSDN Web
site.
Windows Media Player 9 for Mac OS X does not provide access to the plug-in object model by using script code. You can set certain properties as attributes by using the PARAM tag when
you embed the Player. The following is the list of properties for which values may be specified when embedding Windows Media Player 9 for Mac OS X:
AutoStart
BaseURL
CurrentMarker
CurrentPosition
DefaultFrame
FileName
InvokeURLs
Mute
PlayCount
PreviewMode
SAMIFileName
SAMILang
SAMIStyle
SelectionEnd
SelectionStart
ShowAudioControls
ShowCaptioning
ShowControls
ShowDisplay
ShowGotoBar
ShowPositionControls
ShowStatusBar
ShowTracker
Volume
Note: You must specify a value for the FileName attribute before specifying values for any other attributes.
For details about the behavior of the attributes in the preceding list, refer to the "Version 6.4 Object Model Reference" section of the Windows Media Player 6.4 SDK.
Detecting the Player
You can write script for the Macintosh to verify that Windows Media Player is installed on the client computer. You can also check if the Player is installed on clients using Netscape Communicator
4.5 or later and Internet Explorer for Mac version 5 or later.
To check for the installation of Windows Media Player for Mac, use the following JavaScript code to check for the plug-in.
var fHasWMP = navigator.mimeTypes
&& navigator.mimeTypes["application/x-mplayer2"]
&& navigator.mimeTypes["application/x-mplayer2"].enabledPlugin;
if( fHasWMP ) {
document.write("Windows Media Player is installed.");
}
For more information about detecting Windows Media Player, see the article "Detecting a Player on a Consumer's Computer for Windows Media Rights Manager 1" on the
MSDN Web site.
Windows Media files can contain script data formed from two Unicode strings: a type string and an argument string. Windows Media Player for Mac does not support script data of
type TEXT and CAPTION. Script data of type FILE and URL is supported.
For more information about writing script in Windows Media files, see the article "Windows Media Player: Advanced Scripting for Cross-Browser Functionality" on the MSDN
Web site.
A powerful feature of Windows Media Technologies is the ability to enhance content by adding closed captions by using a Synchronized Accessible Media Interchange (SAMI) file. However, closed
captions will not appear when Windows Media Player for Mac is embedded in Internet Explorer and the <EMBED> tag specifies the SAMI file by using the SAMIFilename attribute. Instead,
you should pass the SAMI file location as data in the URL itself:
Microsoft Windows Media Rights Manager is a digital rights management system that helps you to license copyrighted material so you can distribute Windows Media files securely. Windows Media
Player for Mac version 6.3 and version 7 support Windows Media Rights Manager version 1.
Server support.When using Windows Media Rights Manager, servers must be configured specifically to support Macintosh clients. The process involves updating the appropriate
Microsoft SQL Server™ database to contain the proper key value in the drm_constants table of the music database.
You can use the following SQL query to add the key to your database:
insert into drm_constants (attribute, type, value2)
VALUES ('client_verification_public_key_0.1.0.2', 2,
'FiLzeUi!jkNCFzhKaQQh5v0J1jAyq5mDc6F9P2JUFALIasYmYQ!5aA==')
For step-by-step instructions about updating your SQL Server database to support Windows Media Rights Manager on the Macintosh, see the "Macintosh Client Support for the Windows
Media License Service" article on the MSDN Web site.
Windows Media Rights Manager and the embedded Player.If a license for the requested file already exists on the client computer, the file will play in the embedded Windows
Media Player. However, if the license needs to be downloaded, the browser will retrieve the license and then launch the stand-alone version of the Player to play the encrypted content.
Windows Media files with a .wmd file name extension are known as Windows Media Download files. These are compressed files with a .zip extension that have had their file name extension changed
to .wmd. Windows Media Download files can contain Windows Media metafiles (including Windows Media Player borders) and content combined into one download package. Windows Media Player for Mac
will uncompress Windows Media files and files that end with an .mp3 file name extension.
If the Windows Media Download package contains more than one .asx file, the Player automatically plays the last playlist it encounters while uncompressing the .wmd file. Only Windows Media files
ending with an .asx file name extension play automatically. If no .asx file is encountered, the Player uncompresses valid digital media files, but does not play them automatically.
If you provide digital media content that requires authentication of the user, you should not link from a Web page directly to the file. Instead, create an .asx file and include the link to
the digital media content as an entry in the .asx file. Then, point your Web page link to the .asx file.
Linking directly from a Web page to digital media content that requires authentication might yield unexpected results.
Users who use Netscape 7.1 with versions of Mac OS X earlier than version 10.3 may encounter issues when attempting to provide a user name and password for authentication. You might want to
consider alternate methods of providing content for these users.
For detailed information about using the Windows Media Player plug-in and the Windows Media Player for Mac object model, see the Windows Media Player 6.4 SDK on the Microsoft
Web site.
This software is based in part on the work of the Independent JPEG Group.
GIF decompression code, copyright 1990, David Koblas. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without
express or implied warranty.