Windows Media Player Embed Show Controls

How to Embed Windows Media must have Windows Media Player installed. Embedding a video file is achieved by you want to show video controls.

Adding an Embedded Windows Media Player Video Windows Media Player SDK Windows Media Metafiles embed the Windows Media Player control to.

HTML Quick Guide

Oct 04, 2007  Embedding the Player in a Web point that contains the content you want to stream in an embedded Windows Media Player ActiveX control. Show.

Streamalot: Streaming Media Tips, Tricks, examples for two different styles of an embedded Windows Media player. the Windows Media Player control is.

I found a good article about using the WMP with Firefox on MSDN.

Based on MSDN s article and after doing some trials and errors, I found using JavaScript is better than using conditional comments or nested EMBED/OBJECT tags.

I made a JS function that generate WMP object based on given arguments:

function generateWindowsMediaPlayer

holderId, // String

height, // Number

width, // Number

videoUrl // String

// you can declare more arguments for more flexibility

var holder document.getElementById holderId ;

var player object ;

player height height.toString ;

player width width.toString ;

videoUrl encodeURI videoUrl ; // Encode for special characters

if navigator.userAgent.indexOf MSIE 0

// Chrome, Firefox, Opera, Safari

//player type application/x-ms-wmp ; //Old Edition

player type video/x-ms-wmp ; //New Edition, suggested by MNRSullivan Read Comments

player data videoUrl ;

else

// Internet Explorer

player classid clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6 ;

player ;

holder.innerHTML player;

Then I used that function by writing some markups and inline JS like these:

window.addEventListener load, generateWindowsMediaPlayer wmpHolder, 240, 320, ;

You can use jQuery.ready instead of window load event to making the codes more backward-compatible and cross-browser.

I tested the codes over IE 9-10, Chrome 27, Firefox 21, Opera 12 and Safari 5, on Windows 7/8.

This guide contains useful HTML information.

Embedding Windows Media Player.

Windows media player 7.0 and higher code For IE and Firefox

object

    id MediaPlayer width 300 height 300

    classid CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6

    standby Loading Microsoft Windows Media Player components

    type application/x-oleobject

    

     embed type application/x-mplayer2

        name mediaplayer

        pluginspage

        src. ./../download/html/logo.avi

        Height 300

        Width 300

        AutoSize 1

        AutoStart 1

        Balance 0

        DisplaySize 0

        Mute 0

        PlayCount 0

        Rate 1.0

        ShowAudioControls 1

        ShowControls 1

        ShowDisplay 1

        ShowStatusBar 1

        ShowTracker 1

        StretchToFit 0

        TransparentAtStart 0

        Volume 100

Windows media player 6.4 code

    classid CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95

    codebase

    Version 6,4,5,715

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

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

0 - Same size as the source image.

1 - Width and height are one-half of the source image dimensions, resulting in an image that is one-fourth the original size.

2 - Double the dimensions of the source image.

3 - Size of the entire screen.

4 - Size specified at design time.

5 - One-sixteenth the size of the screen.

6 - One-quarter the size of the screen.

7 - Half the size of the screen.

FileName/Url/src

String

The URL of the file to play.

Height

Defines the height of the displayed object in pixels.

Mute

If Mute is enabled true/1, the sound is disabled. The volume parameter is ignored.

PlayCount

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

If this value is set to true/1, the audio controls will be shown.

ShowControls

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

When set to true/1, this displays information such as the the title and artist of the clip.

Height: 74 pixels

ShowStatusBar

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

If this value is set to true/1, the tracker is shown.

StetchToFit

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

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

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.

Posted comments.

A tutorial about HTML embedding Windows Media Player. whether the Windows Media Player control automatically embed tag. Note 2: Windows Media Player.

windows media player embed show controls windows media player embed show controls

Embedding Windows Media Player for all browsers

Using the Windows Media Player Control in a Web Page. Describes how to initialize the Windows Media Player control when you embed it. Show.

Microsoft Windows Media, Advertising Solutions: Embedding the This means you can embed the Windows Media Player control in your Web and an IMG element to show.

windows media player embed show controls