a little new web interface page

2004-01-04
2013-05-08
1 2 3 > >> (Page 1 of 3)
  • BlindWanderer
    BlindWanderer
    2004-01-04

    (i added the images i made to my webspace), i forgot before

    the files are

    sliderbar.gif
    slidergrip.gif
    vbg.gif
    vbs.gif

    ------------

    http://home.comcast.net/~cabbit/control.html

    ready for the shreader ^^

    first off i would like to say this is highly compatible with

    browsers that don't have javascript. the scripts work in both

    Mozilla & Internet Explorer (it took 3 days to build a simple

    progress bar) the only incompatibility in the script comes from

    the handling of the a few events for the goto field, mozilla

    doesn't support the events to do sanity checks on characters

    as they are entered. wasn't sure how to update the position

    or volume so see what i did below...

    the progress bar and goto field's values will change as time

    passes to simulate what the real progress bar is doing in mpc,

    currently i haven't implemented an auto update, but when the

    progress bar gets to the end of the bar it will refresh the

    page. i would recommend for Live files (files with unknown

    length) that an eta is always set (to say 20 seconds??)

    otherwise the page will never refresh. The progress bar &

    goto field are updated for smooth movement of the progress

    bar (refresh 300->1000 milliseconds, its's dynamic) files of

    length 0 are treated as live.

    all but 1 button is included and that is pause. instead i have

    used pause/play

    here are the variable that would make life easy (and are

    currently in the file).

    [statestring]

    [currentpositionstring]   in the format found in status bar

    [lengthstring]        if file is a Live set string to "Live"

    [length]        file length in seconds (Live = -1)

    [namestring]    name of file playing

    [filepathstring]    location of file playing

    [curpos]        current position of playback

    [state]        state of playback (paused = 1, playing =

    2, stopped = 0, Buffering %x = (-x-1) ) (x=(-1to-101))

    [pbr]        rate of playback, any float, setting to 0 is

    the same as state=0

    [eta]        reload of the page, use for when the client

    is buffering (eta in seconds)

    [sound]        (nosound=-1, muted=0, notmuted = 1)

    [volume]        (0->255)

    post for seek to position

    wm_command=-1

    position=hh:mm:ss.ffff

    post for volume update

    wm_command=-2

    volume=0->255

    if you want me to change the volume and position posting it

    would only take a min or too.

     
    • Gabest
      Gabest
      2004-01-04

      chobits: Thanks for everything, a new build is going to be released very soon, I can feel :)

       
    • BlindWanderer
      BlindWanderer
      2004-01-04

      yah :)

      i'll make a more javascript intensive page in the near future (and will clean it up allot). will make the sliders easier to reuse in other code.

      I coded it all my self so i can, (and am) releasing it into GNU GPL.

      this was a great way for me to force my self to learn the eccentricities of javascript. It took 3 days to write the sliders (so that they would work in both mozilla and IE; i'm not touching opera with a 10 foot pole).

      i don't want to be a developer cause i have yet to figure out how to use CVS (the most i have ever managed to do with it was to download source). But i know how to work Wiki :)

       
    • Gabest
      Gabest
      2004-01-04

      Did you get my mail with the test build?

      What are you using to make the code? The IDE of VS.net has a very nice html editor and script debugger.

      > i'm not touching opera with a 10 foot pole

      Hehe, I noticed it has "some" problems with the script :)

      > i don't want to be a developer cause i have yet to figure out how to use CVS

      I just use tortoisecvs, no idea about the commands really either (this was the first time on sf.net I had to use cvs), it can do everything I need with the mouse.

       
      • BlindWanderer
        BlindWanderer
        2004-01-05

        my email seems to have eaten it.

        i have made some updates to the page...

        i really liked the cleaned html. notepad doens't do that automaticaly :(

        changes:
        *fixed JS volume (no doubling required)
        *added refresh button
        *added auto refresh so the page auto updates every two minutes.
        *if the filename is present, state==-1 and eta==0 then eta=1 (this happens when a manual playlist advance is issued).
        *fixed jitter problem in progress bar in mozilla.
        *minor stuff i forget.

        updated page:
        http://home.comcast.net/~chobits/controls.html
        updated & repacked mpc: (used upx & Resource Hacker)
        http://home.comcast.net/~chobits/mplayerc.exe

         
    • BlindWanderer
      BlindWanderer
      2004-01-05

      i do not recommened using the version of mpc i have hacked together, as i have gotten a number of errors from it (for no good reason that i can tell).

       
    • BlindWanderer
      BlindWanderer
      2004-01-05

      I have made a little guide on how to (re)use the sliders in your own website, if your interested.

      http://www.geocities.com/registrylord/simple-slider.txt

       
    • BlindWanderer
      BlindWanderer
      2004-01-06

      give me 2 weeks and i'll finish totaly rebuilding the web interface controls i just built. What it is currently will be more or less for browsers with no javascript support.

      Goals (for javascript supporting browsers):

      *Little popup layers for all of the random controls
      *Sending commands to an iframe to be executed (so the main window doesn't refresh)
      *Read data from the iframe to update the data in the main window.
      *Playlist Editor. (i'm thinking this should be easy compaired to the others)

      Goals for non Java Browsers
      Make the interface a little cleaner.

      All goals require me to learn alot more javascript. (maybe i'll see if VS6 does decent web development)

       
      • Gabest
        Gabest
        2004-01-06

        I think it would be better to create a separate page for browsers unable to read javascript. Those <noscript> tags make it a mess and non standard compaint because of overlapping tags.

        > maybe i'll see if VS6 does decent web development

        Noooo, it's VS7 aka VS.net I was talking about! :)

         
        • BlindWanderer
          BlindWanderer
          2004-01-06

          all the buttons (almost all) are going to be one big noscript block

          for java browsers it's going to be handled differently

           
          • BlindWanderer
            BlindWanderer
            2004-01-06

            java browsers are going to get a special controls that drop down from special buttons. Basicly i don't know how to code the java backend for it. so i'm going to look on google simple samples and then build up from there. The iframe stuff i'm going to do last as that is going to take the most work.

            I built a simple java free playlist editor added to the file on my space
            http://home.comcast.net/~cabbit/controls.html
            need keywords [playlist] & [currentplaylistposition]
            posted variables are:
            wm_command=-3
            playlist=<textarea>
            playupdate=<checkbox>
            playlistposition=positive int

             
            • BlindWanderer
              BlindWanderer
              2004-01-12

              The only reason i made the playlist editor the way it is to make it easier to code a java free version. It's the only way i could think of that would be simple. To make a complicated java version with links and such could be done, but i haven't done truely dynamic page manipulation before. Changing attibutes of tags is one thing, but creating & deleting new page objects is another. Looks like i'll be hitting google soon.

               
    • BlindWanderer
      BlindWanderer
      2004-01-08

      i'm taking a day or two off from working on the web interface page. I'll be out wandering.

      Gabest: good luck on the aac in rm.

       
      • Gabest
        Gabest
        2004-01-08

        Ok, no problem.

         
    • Andrew
      Andrew
      2004-01-11

      Earlier in the thread you mentioned you were working on putting more JavaScript into the web interface.  Please don't make it so that the web interface RELIES on JavaScript to function, as I use the web interface to control MPC wirelessly on a PDA which unfortunately has no JavaScript support.

      If the JavaScript enhances some of the functionality, that's fine though =)

       
      • BlindWanderer
        BlindWanderer
        2004-01-11

        What you currently see in a non java browser is what will always be there. What i want to do is make more advanced and easier to use controls in java, for people with java. People without java will get the what is currently there. My goal is to make this compatible with as many browsers as possible.

        My goals are to hide most of the control when they are not in use.

        The browser i have been using for testing (the non java content) is "Off By 1"

         
      • BlindWanderer
        BlindWanderer
        2004-01-11

        i'm also very glad that somebody besides me and gabest posted, i was getting worried. Honestly i have little use for the web interface (then playing tricks on people :P). I'm using this as an experiment in learning javascript.

        If you have an idea i'll try and add it. (example: if you want a volume balance i'll script it)

         
    • BlindWanderer
      BlindWanderer
      2004-01-20

      I changed the images and the page a tiny bit (to accomidate the image changes).

      go here for files.
      http://home.comcast.net/~cabbit/mpc.html

      i'll be putting the file links on that page from now on and just providing a link to it.

       
    • BlindWanderer
      BlindWanderer
      2004-02-02

      some small bug fixes

      also these changes need to be made to the web interface. (this is so the slider doesn't do starnge things when you click it during live playback)
      [code]
      if (m>sb1.width)
      [/code]
      becomes
      [code]
      if (Live) {m=0;curpos=(new Date()).getTime()-starttime}
      if (m>sb1.width)
      [/code]
      and
      [code]
      cpf.value=secondsToTS(curpos,5,false);
      sas.checked=false;
      [/code]
      becomes
      [code]
      cpf.value=secondsToTS(curpos,5,false);
      if (!Live) sas.checked=false;
      [/code]

      also the refresh button doesn't work for non java browsers here are two solutions(i didn't test it last time a changed it)
      add this into one of the noscript tags around the refresh button (inside the form)
      [code]
      <input type="hidden" name="[wmcname]" value="156">
      [/code]
      or
      [code]
      <form action="[commandpath]" method="POST">
      [/code]
      becomes
      [code]
      <form action="/controls.html" method="POST">
      [/code]

       
      • BlindWanderer
        BlindWanderer
        2004-02-02

        don't do this
        [code]
        if (m>sb1.width)
        [/code]
        becomes
        [code]
        if (Live) {m=0;curpos=(new Date()).getTime()-starttime}
        if (m>sb1.width)
        [/code]

        do this instead
        [code]
        if (a==-2000) return false;
        if (b)
        [/code]
        becomes
        [code]
        if (a==-2000) return false;
        if (Live) {m=0;    curpos=(new Date()).getTime()-starttime;}
        else if (b)
        [/code]

         
        • Mackila
          Mackila
          2004-02-03

          When I saw this, I tought "wow this is great"...

          But unless I missed it, the main feature that would rock is not here :

          Streaming the output sound to HTTP (on another port), with the ability to choose bitrate / codec. So WMP would become something like my universal audio player when I'm at school. Getting the sound through HTTP and controlling the stream through HTTP would be realy great.

          The 100% web audio player,
          The HTTP remote controled all media player,
          MPC :)

           
          • BlindWanderer
            BlindWanderer
            2004-02-03

            i want to see the playlist expanded on before streaming audio.

             
            • Mackila
              Mackila
              2004-02-04

              You are right.
              Not very attractive to have to play each song one by one by the web interface...

               
1 2 3 > >> (Page 1 of 3)