Solved

Windows Media Player 9 Series Controls

Posted on 2003-11-04
7
3,570 Views
Last Modified: 2007-12-19
I am making a custom interface for of media player and embedding it on a webpage. In the OBJECT tag I am using CLASSID:="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" -- This ID is for Windows Media 9 Series. I have made custom controls to Play, Pause, and Stop the video.

The problem I am having are that:
1) I am not able to remove the original controls of the windows media player.
2) After clicking PAUSE button the video pauses BUT when I click Play again, the video starts from the beginning and NOT from the current location.
3) I have found some articles on the MSDN but I am not able to understand them as they are not explained with a nice expample.

You can check the page I have made from this site http://webdev.maxwell.syr.edu/skalra/custom_skin/test.htm also, please see the coding I have been doing from the View Source.

Please help me out.

Thanks.
0
Comment
Question by:shamitkalra
7 Comments
 
LVL 14

Expert Comment

by:spiderfix
ID: 9683070
*.edu

When is the assignment due?
0
 

Accepted Solution

by:
gmeader earned 25 total points
ID: 9736551
<HTML>
<HEAD></HEAD>
<BODY>
<SCRIPT LANGUAGE="JAVASCRIPT">
function StartPlay()
{
  if (mediaPlayer.controls.isAvailable('Play'))
  {
    mediaPlayer.controls.Play();
  }
}

function StopPlay()
{
  if (mediaPlayer.controls.isAvailable('Stop'))
  {
    mediaPlayer.controls.stop();
  }
}

function playerPause()
{
  if (mediaPlayer.controls.isAvailable('Pause'))
  {
     mediaPlayer.controls.pause();
  }
}

function Show()
{
mediaPlayer.showcontrols=true;
mediaPlayer.showTracker=true;
mediaPlayer.showStatusBar=true;
}

function Hide()
{
mediaPlayer.showcontrols=false;
mediaPlayer.showTracker=false;
mediaPlayer.showStatusBar=false;
}

function updateStatus()
{
statusField.value=mediaPlayer.Status;
position.value=mediaPlayer.controls.currentPositionString;
}
</SCRIPT>

<object ID="mediaPlayer" CLASSID="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6"
TYPE="application/x-oleobject"
WIDTH="320" HEIGHT="240">
<PARAM NAME="AutoStart" VALUE="true">
</object>
Using Windows Media Player 9 SDK API
  <br>
  <input name="URLfield" type="text" id="URLfield" value="http://bogus.com/ohyeah.wma" size="60">
</p>
<p>
  <input name="btnURL" type="button" value="send URL" OnClick="setURL()">
  <input name="btnPlay" type="button" value="Play" OnClick="StartPlay()">
  <input name="btnStop" type="button" value="Stop" OnClick="StopPlay()">
  <input name="btnShow" type="button" value="Show Controls" OnClick="Show()">
  <input name="btnHide" type="button" value="Hide Controls" OnClick="Hide()">
  <input name="btnPause" type="button" value="Pause" OnClick="playerPause()">
  Position:
  <input name="position" type="text" size="6">
  Duration:
  <input name="durationfield" type="text" size="8">  
<p>  status:
  <input name="statusField" type="text" id="statusField" size="40">
</p>


<script language="JavaScript" type="text/JavaScript">
// update fields every 1000 milliseconds (1 second)
  var timer = window.setInterval("updateStatus()",1000);
</script>

</SCRIPT>
<!-- Create an event handler to update the display when
 the current media item changes. -->
<SCRIPT LANGUAGE = "JavaScript"  FOR = mediaPlayer  EVENT = OpenStateChange(NewState)>

// Test whether the new media item is open.
if (NewState == 13){

   // Write the formatted duration string to a textfield.
   durationfield.value = mediaPlayer.currentMedia.durationString;
}
</SCRIPT>

0
 

Assisted Solution

by:sludgebob
sludgebob earned 25 total points
ID: 10234107
0
 

Author Comment

by:shamitkalra
ID: 10234752
Thanks for the response everyone. I figured out the solution myself. The final version of the custom interface is at this site http://webdev.maxwell.syr.edu/skalra/custom_skin/final/default.asp click Test Video link.

Thanks again.
0
 
LVL 11

Expert Comment

by:turn123
ID: 10422543
Hello,

This question has been classified as abandoned.   I will make a recommendation to the moderators on its resolution in the next few days.

EXPERTS: Please make a recommendation on how you feel the question should be closed.  If you feel you deserve points here, but don't care to respond, the question might very well get DELETED.

ASKER:  Please return and finalize this question.  Abandoning a question is in violation of the member agreement.  If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help.jsp#hs5

Please do NOT accept this comment as an answer, as I am simply trying to alert those involved that the question is still open.

Thank you,

Turn123
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Since 2008, the stock markets have been in a haphazard state of fluctuation. At times it has been a steep decline (2008) and at others, a steady incline full of promise (2010). Just weeks ago, in August 2011, together we saw the stock markets plunge…
Finding a job can be stressful - searches, resume tweaks, and networking events can be super boring. Luckily we're here to help you land your dream job!
Notifications on Experts Exchange help you keep track of your activity and updates in one place. Watch this video to learn how to use them on the site to quickly access the content that matters to you.
Articles on a wide range of technology and professional topics are available on Experts Exchange. These resources are written by members, for members, and can be written about any topic you feel passionate about. Learn how to best write an article t…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now