?
Solved

Windows Media Player 9 Series Controls

Posted on 2003-11-04
7
Medium Priority
?
3,578 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 100 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 100 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Phishing is at the top of most security top 10 efforts you should be pursuing in 2016 and beyond. If you don't have phishing incorporated into your Security Awareness Program yet, now is the time. Phishers, and the scams they use, are only going to …
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…
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…
Suggested Courses

770 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