Solved

Windows Media Player 9 Series Controls

Posted on 2003-11-04
7
3,575 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
[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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
With the shift in today’s hiring climate (http://blog.experts-exchange.com/ee-blog/5-tips-on-succeeding-in-the-new-gig-economy/?cid=Blog_031816), many companies are choosing to hire freelancers to get projects completed efficiently and inexpensively…
The Bounty Board allows you to request an article or video on any technical topic, or fulfill a bounty request to earn points. Watch this video to learn how to use the Bounty Board to get the content you want, earn points, and browse submitted bount…
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.

732 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