free hosting   image hosting   hosting reseller   online album   e-shop   famous people 
Free Website Templates
Free Installer

Using Windows Media Player


Windows Media Player 7.1 (WMP) is a major update from version 6.4.

Gone is the little black box - now there's a brand-new interface with skins, swirling visualizations, and much greater flexibility.

But how do you use it?

Its main feature is what you can do with the WMP metafiles - .asx or .wax - both of which seem have the same functions.

But with them, you can:
  • create continuous playlists
  • add extra file information (artist, title, copyright, etc.)
  • use the one plugin to play various media files (wma, MIDI, mp3 and more)

  • Metafile Features

    In the above example, the metafile is used to create a playlist of 4 MIDI files.

    The full URL of each file is included between 4 sets on ENTRY tags.

    And it should be the full URL, not a relative address - otherwise WMP may not know where to find each file.

    Also, each URL must have its own set of ENTRY tags.

    If you place all URLs inside the same set of tags, the first file will load and play, but not the rest.
    In this example, we still have a playlist, but we've mixed the file types.

    Any file type that WMP supports can be used here.


    Adding Extra Information to the Metafile

    Here we've added some extra information about the file.

    Notice that in this example, it's a MIDI file, which doesn't support all these details in its own internal meta section.

    For a playlist, just repeat all the information inside the ENTRY tags, and change the details to suit.

    There's a lot more options available, but this gives you an idea of what can be done.

    And you'll see it in action when you check out the Demo Jukebox at the bottom of this page.


    Creating The Files

    If you have existing MIDI or MP3 files, there's no problem. But how do you encode your audio files as Windows Media?

    Very simple - just download the free encoder from Microsoft.

    Or, if you have an audio editor that lets you save files in Windows Media format, use that instead.

    Both Cool Edit Pro and Sound Forge have these facilities.

    For use on the Web, use a low-bandwidth setting, so that your file downloads quickly for even the slowest connections.

    I recommend:
    FM Radio Quality, 28.8 Kbps Stereo
    For personal use, as an alternative to wave or mp3, use one of the CD-quality settings.


    Creating The Playlist

    As indicated by the above example, you simply list your files and details inside ENTRY tags, one file per set of tags.

    You can do this in any text editor (such as Notepad), then save with a .asx extension - eg: mid.asx.

    Then do the same for your audio files, which may be in any format supported by WMP.

    The file information will then be displayed in the plugin's message line.

    Since the audio examples I've included in the demo jukebox are quite short, you may not see the file information.

    But the MIDI files are complete songs, so use that option to see what the information display looks like.


    Building the Jukebox

    This is similar to the Popup Audio/MIDI jukebox, except this one uses only 2 frames:
  • top frame for the menu
  • bottom frame for loading the plugin
  • For something different, we're using radio buttons as links - click a button for the desired playlist.
    When the desired button is clicked, it calls the function PlayWMA:
    For this frameset, we've called the bottom frame wjuke.

    As we did with the Popup Audio/MIDI jukebox, we're writing the required CLASSID code direct to the bottom frame.

    But this time, we're using a combination of VBScript and Javascript.

    The Javascript detects whether the browser is IE or Netscape.

    If the browser is IE, VBScript is used to create an Active-X object called WMPlayer.OCX, which is then embedded.

    If it's Netscape, or if WMP7.1 is not present, the normal embed tag is used.

    This tag should work for both IE and Netscape - no guarantees, though!


    Playing All Files

    A little extra feature of this jukebox is the ability to play:
  • audio files only
  • MIDI files only
  • all files
  • The latter is achieved by loading a combined .asx file:
    This merely executes the audio playlist, followed by the MIDI playlist. Simple but effective!

    Unfortunately, the last option doesn't work with the generic plugin.


    Try It Out

    Open Jukebox




    [ View Source Code of this Page ]



    © 2001 Cyber School
    Last Update: