[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Java script to eambed wmv player in html

Posted on 2011-09-17
9
Medium Priority
?
501 Views
Last Modified: 2012-05-12
Hi,

I want to use javascript to embed wmv player in html

I used JWplayer but it didn't support wmv format

0
Comment
Question by:savsoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36555230
You don't need javascript.  A couple of examples here: http://stackoverflow.com/questions/2538724/how-to-embed-wmv-files-in-my-html-file   And below is one from one of my websites.
<object id="MediaPlayer" width="320" height="290" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">

<param name="filename" value="http://www.lisaphenix.com/LisaPhenix.wmv" />
<param name="url" value="http://www.lisaphenix.com/LisaPhenix.wmv" />
<param name="src" value="http://www.lisaphenix.com/LisaPhenix.wmv" />
<param name="Showcontrols" value="True" />
<param name="autoStart" value="True" />

<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.lisaphenix.com/LisaPhenix.wmv" name="MediaPlayer" width="320" height="290" autostart="1">
</embed>

</object>

Open in new window

0
 

Author Comment

by:savsoft
ID: 36555259
we have to change all filename, url and src address with our file location ?
I have done this but it shows player but didn't play video, webpage is continue loding page...

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36555276
Yes, you need to change all filename, url and src address to your file location.  That video is currently working on that website.  It works in IE8, Firefox, and Chrome but not in Safari and Opera.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:savsoft
ID: 36555282
it doesn't load in firefox 6
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36555369
It does on my computers on Windows XP and Windows 2000.  You do have to have Windows Media Player to play a WMV file.  I don't know what else plays them.
0
 

Author Comment

by:savsoft
ID: 36555378
Following code working fine but didn't shows status or control bar of player so we can replay video
<object id="MediaPlayer" width="320" height="290" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media 

Player components..." type="application/x-oleobject" 

codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">

<param name="filename" value="upload/11712-Date-16-09-2011.wmv" />
<param name="url" value="upload/11712-Date-16-09-2011.wmv" />
<param name="src" value="upload/11712-Date-16-09-2011.wmv" />
<param name="Showcontrols" value="True" />
<param name="autoStart" value="True" />
<embed type="application/x-mplayer2" pluginspage="upload/11712-Date-16-09-2011.wmv" src="upload/11712-Date-16-09-2011.wmv" 

name="MediaPlayer" width="320" height="290" autostart="1">
</embed>


</object>

Open in new window

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 36555403
Adjust the width="320" height="290" in two places.  It can cause the controls to be covered.  View your video in Windows Media Player and get the right numbers from it.  On the File menu under properties, you can get the size of your video.  I added 50 to the height to make room for the controls.
0
 
LVL 7

Expert Comment

by:Kishan Zunjare
ID: 36555899
Create Javascript function of you code and provide following in asp.net code behind;

On the page load event
Button1.Attributes.Add("onclick","JS FunctionName()");

Hope this will work.
0
 
LVL 7

Expert Comment

by:Kishan Zunjare
ID: 36555900
Sorry please ignore my post..

Wrong thread...
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question