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
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Windows media player embedded that show playlist itens.

    Hi
    I've been working on this for a long time, tried a lot of players, but then, went back to wmp.

    My trouble is: I can embedded windows media player, and make it load an asx playlist, buuuut, it wont show the playlist itens, so, the user can not choose wich item he want to see.

    I tried an alternative here that worked, make a link for each item without using the asx playlist, but the higher problem is that I have more than 800 itens on the asx playlist to copy and rename.

    you know when you open wmp on your computer, and then it shows a playlist on the right corner, that's what I'm trying to do.

    Help me, please, it can even be a php script that loads and show the asx playlist, or in another language, such as java script.


    Ty

    Greetings

  • #2
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found a script, configured it acording to the guide, but now, only the player works, the playlist wont show up.

    Code:
    <head>
    <script language="javascript1.2">
    function loadPlayItems() {
            df=document.getElementById("playItem");
            dp=document.getElementById("playlist");
            WMP9=document.getElementById("MediaPlayer1");
    
    WMP9.url="http://tv.mghospedagem.com/jwp-silverlight/play.asx";
            WMP9.controls.play();
    
    }
    
    function showPlayItems() {
            WMP9=document.getElementById("MediaPlayer1");
            playlistItems=WMP9.currentPlaylist.count;
            for (i=0; i<playlistItems; i++) {
                    playitem=document.createElement("a");
                    playnext=document.createElement("br");
                    playitem.setAttribute("href","#");
                    playitem.setAttribute("onclick","playItem("+i+")");
                    playitem.innerText=WMP9.currentPlaylist.item(i).name;
                    dp.appendChild(playitem);
                    dp.appendChild(playnext);
            }
            playListLoaded=true;
            WMP9.controls.stop();
    
    }
    
    function setPlayItem(index) {
            WMP9=document.getElementById("MediaPlayer1");
            playlistItems=WMP9.currentPlaylist.count;
            if (playlistItems > 0) {
    
    WMP9.controls.currentItem=WMP9.currentPlaylist.item(index);
                    WMP9.controls.play();
            }
    }
    
    </script></head>
    
    <body onLoad="loadPlayItems()">
    <object id="MediaPlayer1"
    classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
    type="application/x-oleobject" width="600" height="400">
    <param name="autostart" value="0">
            <param name="showcontrols" value="0">
            <param name="uimode" value="full">
            <param name="stretchtofit" value="1">
            <param name="enablecontextmenu" value="0">
    </object>
    
    <div id="playlist" style="position: absolute; top: 10px; left:
    640px; visibility: visible;">
    <h2>Playlist</h2></div>
    
    <script language="javascript1.2" for="MediaPlayer1"
    event="playStateChange">
    WMP9=document.getElementById("MediaPlayer1");
    if (WMP9.playState==3 && ! playListLoaded) {
            showPlayItems();
    }
    
    </script>

    You can see the page here http://tv.mghospedagem.com/wmp-plBYTES.html
    Ps: only work for IE.

    And here is where I got the code from https://groups.google.com/group/microsoft.public.windowsmedia.player.web/browse_frm/thread/d134164e3d514963/0f180dd8ceaed3a1?tvc=1&q=%22showPlayItems%28%29%22+author:Neil+author:Smith+author:[MVP+authorigital+author:Media]&hl=en&pli=1

  • #3
    New to the CF scene
    Join Date
    Feb 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    Quote Originally Posted by matheusgrafix View Post
    I found a script, configured it acording to the guide, but now, only the player works, the playlist wont show up.

    Code:
    <head>
    <script language="javascript1.2">
    function loadPlayItems() {
            df=document.getElementById("playItem");
            dp=document.getElementById("playlist");
            WMP9=document.getElementById("MediaPlayer1");
    
    WMP9.url="http://tv.mghospedagem.com/jwp-silverlight/play.asx";
            WMP9.controls.play();
    
    }
    
    function showPlayItems() {
            WMP9=document.getElementById("MediaPlayer1");
            playlistItems=WMP9.currentPlaylist.count;
            for (i=0; i<playlistItems; i++) {
                    playitem=document.createElement("a");
                    playnext=document.createElement("br");
                    playitem.setAttribute("href","#");
                    playitem.setAttribute("onclick","playItem("+i+")");
                    playitem.innerText=WMP9.currentPlaylist.item(i).name;
                    dp.appendChild(playitem);
                    dp.appendChild(playnext);
            }
            playListLoaded=true;
            WMP9.controls.stop();
    
    }
    
    function setPlayItem(index) {
            WMP9=document.getElementById("MediaPlayer1");
            playlistItems=WMP9.currentPlaylist.count;
            if (playlistItems > 0) {
    
    WMP9.controls.currentItem=WMP9.currentPlaylist.item(index);
                    WMP9.controls.play();
            }
    }
    
    </script></head>
    
    <body onLoad="loadPlayItems()">
    <object id="MediaPlayer1"
    classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
    type="application/x-oleobject" width="600" height="400">
    <param name="autostart" value="0">
            <param name="showcontrols" value="0">
            <param name="uimode" value="full">
            <param name="stretchtofit" value="1">
            <param name="enablecontextmenu" value="0">
    </object>
    
    <div id="playlist" style="position: absolute; top: 10px; left:
    640px; visibility: visible;">
    <h2>Playlist</h2></div>
    
    <script language="javascript1.2" for="MediaPlayer1"
    event="playStateChange">
    WMP9=document.getElementById("MediaPlayer1");
    if (WMP9.playState==3 && ! playListLoaded) {
            showPlayItems();
    }
    
    </script>

    You can see the page here http://tv.mghospedagem.com/wmp-plBYTES.html
    Ps: only work for IE.

    And here is where I got the code from https://groups.google.com/group/microsoft.public.windowsmedia.player.web/browse_frm/thread/d134164e3d514963/0f180dd8ceaed3a1?tvc=1&q=%22showPlayItems%28%29%22+author:Neil+author:Smith+author:[MVP+authorigital+author:Media]&hl=en&pli=1

    I need help ASAP. Please.


  •  

    Tags for this Thread

    Posting Permissions

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