Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Controlling two windows media player embedded videos using a single button

    Hello,
    Does anybody know how can I control playback/pause, etc in a webpage for two videos playing simultaneously? I want to play them synchronized, and whenever I press Pause, it applies to both at the same time. Same for other controls. Videos are local files, and the page is client-side only. Any suggestions in javascript/ajax/Flex/DHTML/etc?
    Thanks
    Cesar

  • #2
    Regular Coder mjlorbet's Avatar
    Join Date
    Jan 2008
    Location
    Milwaukee, WI
    Posts
    724
    Thanks
    8
    Thanked 96 Times in 95 Posts
    http://msdn.microsoft.com/en-us/library/ms930697.aspx

    is a link with the information about the activex control that you would use on your web page to play media content with windows media player. the functions documented in the page can be called via javascript, on click of a button (not one on the control, as the buttons on the control itself are bound to internal functions). i would suggest hiding the normal buttons on each control, and creating your own buttons to handle the synchronized operations (calling the same, corresponding, function on each of the objects instantiating the windows media player activex control).

    Example:
    Code:
     
    function pause_onclick(){
    document.getElementById("player1").Pause();
    document.getElementById("player2").Pause();
    }
    -Mike
    "Want me to precludify him, like some kind of dispatcherator?... Can do!" -Bender

  • #3
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks a lot. I had to use
    document.getElementById("player1").controls.Pause(); (insert .controls.) for some reason, but it did exactly what I was looking for. Many thanks!
    Cesar


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •