Help - Search - Members - Calendar
Full Version: foo_httpcontrol
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5
oblikoamorale
This foobar2000 plugin is developed as a replacement for Media Player Classic web control interface, which I used quite a lot, but still didn't like it, as it missed quite a number of features I'd like to have. Also I felt it's a shame such great player as foobar2000 couldn't be remotely controlled over http nowadays. So, erm, I went ahead and somehow developed the plugin featuring functions I use by myself on everyday basis.

The plugin provides the following features via http interface:
- full control of playback, including seekbar;
- basic playlist support;
- basic file browser functions, including ability to browse Microsoft Network;
- a few custimization abilities;

Http interface uses external template files containing a bit of CSS and JS, and is tested and proved itself working on Opera 9.26, Firefox 2.0.0.8 and MSIE6.

Screenshot

Download: foo_httpcontrol v0.79
math0ne

I couldn't get this to work. It connects but i just get a blank page.

I've tried multiple ports.

Here's my versions: http://screencast.com/t/pBERELarlGH
oblikoamorale
by default it is configured to be available on network interfaces via port 8888. http://127.0.0.1:8888/ should work.

do you see 'Bind successful' message in File/Preferences/Display/foo_httpcontrol page?

by the way, check foobar console for any error messages -- perhaps there is a problem with template files loading, they are expected to be found in foobar's components directory.
foo_peter
Extremely useful....have been using it for a long time...makes things a lot more productive...thx for the update!

foo_peter
Chipicui
Wow!! amazing... Thanks a lot ! smile.gif smile.gif smile.gif
Works really fine here..
(Now the only thing I miss is the option to show "cover.jpg") wink.gif

A little issue: When you enqueue a whole folder, everything inside gets enqueued, (*.txt *.jpg...etc...)
Would be nice if it'd only enqueue audio files, but it's no big deal here...
Thank you very much!!!
Chipicui
Sorry if I bother you too much... but this little plugin is soooooo useful to me that I can't help it... rolleyes.gif
You know... everything works perfectly from Opera,
Using it via wifi from my Palm browser, I can't change volume (although I see the vol box) and I can't seek... everything else works fine and fast!
Do you have an idea of what could be causing this behaviour?
I've been taking a look to the code, but I don't really have an idea about javascript...
Were really close to the perfect remote control to foobar!!!!!! wink.gif
TooSteep
Newb question here...

From Opera 9.26, I am trying to run pages from SpyTunes, such as this one:

http://spytunes.co.uk/S-E-P-R/Level1/Rhythm.html

There is a simple link to an MP3 file on the page. I'd like to click on it, and have it played through my Foobar player.

Is this what your control does? I downloaded and installed it, taking the default preferences, but I still get the same Opera error: "You need a plugin to view .... blah blah blah ..."

If your control does not serve this function, do you know how I can get thes clips playing from within Opera?

Thanks a lot.


blubbo
I like the idea but with 70% cpu utilization when playing and the same blank page problem as has been reported by others I'd say you've got some more testing to do.

I'll definitely keep an eye on this. :) Keep it up!
Hamallainen
Thank you so much for this.
There's a long time i was needing this kind of control. It's so useful for me
oblikoamorale
QUOTE(Chipicui) *

Using it via wifi from my Palm browser, I can't change volume (although I see the vol box) and I can't seek...
Do you have an idea of what could be causing this behaviour?


well, I have no idea about issues of palm browser. perhaps it doesn't recognise onchange event in dropdown list? all I can offer in this case is to provide opportunity to raise/lower volume level by a certain amount via buttons, instead of dropdown list. regarding the seek issue, it's a difficult question, as a matter of getting mouse coordinates is a weird issue even for pc browsers. I guess you'll have to do some research on this topic, and modify JS template section by yourself.
and thanks for the dir enqueue note!

TooSteep - I guess you chose the wrong tool for your task in this case...

regarding the problem with a blank page and (or) high cpu usage, perhaps monstrous playlist size might have something with it? I'll look into it later
Hamallainen
Hi,

A little feedback after some testing.

In Firefox 2.0.0.13, volume and playback order dropdown boxes do not have any effects on foobar (i'm using foobar 0.9.5.1 with ColumnsUI 0.3 beta 1 preview 4). I also tested it in IE 6 and it works correctly so it's maybe something i should change in the templates to make it work with Firefox.

Also it seems there's a sorting problem when browsing folders and files on a network. They are sorted randomly in both IE and Firefox.
oblikoamorale
QUOTE(Hamallainen @ Mar 29 2008, 14:46) *

In Firefox 2.0.0.13, volume and playback order dropdown boxes do not have any effects on foobar (i'm using foobar 0.9.5.1 with ColumnsUI 0.3 beta 1 preview 4). I also tested it in IE 6 and it works correctly so it's maybe something i should change in the templates to make it work with Firefox.


yep, replacing all occurences of 'this.document' to just 'document' in control template should solve this.
btw, Chipicui, it might help with half of the problem you are having with palm browser too.

QUOTE(Hamallainen @ Mar 29 2008, 14:46) *

Also it seems there's a sorting problem when browsing folders and files on a network. They are sorted randomly in both IE and Firefox.


thats definitely weird, as I actually don't sort files in any way -- I just display what FindFirstFileW/FindNextFileW API functions return, and they do actually return alphabetically sorted data on my winxp sp2.
whats the specifics of your OS?
Hamallainen
QUOTE(oblikoamorale @ Mar 29 2008, 13:35) *
yep, replacing all occurences of 'this.document' to just 'document' in control template should solve this.
btw, Chipicui, it might help with half of the problem you are having with palm browser too.

Thanks a lot, it works now

QUOTE(oblikoamorale @ Mar 29 2008, 13:35) *
thats definitely weird, as I actually don't sort files in any way -- I just display what FindFirstFileW/FindNextFileW API functions return, and they do actually return alphabetically sorted data on my winxp sp2.
whats the specifics of your OS?

About this 'problem', it's maybe my fault because i had not seen this in your first post :
- basic file browser functions, including ability to browse Microsoft Network;
In fact, my files which are stored on the network are on a network drive (Synology DS207) which seems to have some linux version as OS. Otherwise the OS of my computer is XP Pro SP2.

About the functionalities of your plugin, do you have already done what you need or do you still consider feature requests ?
TooSteep
QUOTE(oblikoamorale @ Mar 28 2008, 22:45) *

...

TooSteep - I guess you chose the wrong tool for your task in this case...



Thanks for responding. I guess that means there is no Foobar plugin for Opera or I.E.? Do you recommend any particular plugin for Opera for playing mp3's from an embeeded link such as:

<embed src="http://spytunes.co.uk/images/spytunes/rythms/basicstrpatL1/ex01.mp3" height="15" autostart="false" align="middle" id="rhythm" name="rhythm" alt=""></embed>
oblikoamorale
QUOTE(Hamallainen @ Mar 29 2008, 16:59) *

In fact, my files which are stored on the network are on a network drive (Synology DS207) which seems to have some linux version as OS. Otherwise the OS of my computer is XP Pro SP2.

eh, my bad, actually. seems like file order is not guaranted, according to documentation. no big deal anyway, I'll add a compulsive file list sort.
QUOTE(Hamallainen @ Mar 29 2008, 16:59) *

About the functionalities of your plugin, do you have already done what you need or do you still consider feature requests ?

to be honest, this thing satisfies my own needs by around 90% as it is now, but I wouldn't mind hearing suggestions as I still have some interest in messing with its development.
bubbleguuum
Useful plugin, I want to use it with my PSP, as a remote.

It worked once, then it's now always a blank page and 50-70% CPU usage...(check you don't have an active loop in your code, especially on an error)
nightfishing
Works great. (very handy)

Thank you!
Hengest
Thanks for the plugin. One suggestion though: add the option of requiring a user name and password to access the page.
oblikoamorale
updated...
CODE

    v0.6 30 Mar 2008
        fix: templates, here and there;
        fix: wrong state caused by starting on-paused foobar;
        fix: blank page and excessive cpu usage on insane playlist sizes;
        fix: compulsive list sort in file browser;
        fix: simultaneous enqueuements disabled;
        add: filter of enqueued items;
        add: configurable retrieval of playlist (for those who need as
             lightweight control page as possible)
Hamallainen
QUOTE(oblikoamorale @ Mar 30 2008, 19:18) *
updated...

Thanks for the new template and the fix for the large playlists
and my sorting problem on network is gone now. Great ! smile.gif
smok3
(about sorting: the same behavior is noticed with php dir listing for example, where win will return alphabet and nix some random stuff)
Chipicui
Holy cow!!!!!!!!!!!!!!!! laugh.gif smile.gif biggrin.gif
Thank you so much for the update!
Don't know what kind of magic you did to the template's code but now EVERYTHING works in my PalmTX.
Thanks to you, now I can have a fast remote control for foobar!
I'm extremely thankful...

One suggestion if you really want to go the extra mile: could you implement a drop-down list (or simply another web page) to change the active playlist?

Thanks a lot! smile.gif smile.gif smile.gif
Chipicui
A question:
How do you filter a folder to enqueue (for example)... only mp3 files?
Thanks
oblikoamorale
QUOTE(Chipicui @ Mar 31 2008, 17:30) *

A question:
How do you filter a folder to enqueue (for example)... only mp3 files?
Thanks


actually I retrieve the list of foobar supported playable files for that. hmm, weird, looks like the extensions restriction I pass to foobar process_locations_async is not making any effect, and I overlooked that. additional filter of incoming filenames added, version 0.6 re-uploaded...
bubbleguuum
Thanks for the updated version


I got the plugin to crash foobar several times by enqueuing a directory (in
the www file broswer)
Chipicui
QUOTE(oblikoamorale @ Mar 31 2008, 12:35) *

QUOTE(Chipicui @ Mar 31 2008, 17:30) *

A question:
How do you filter a folder to enqueue (for example)... only mp3 files?
Thanks


actually I retrieve the list of foobar supported playable files for that. hmm, weird, looks like the extensions restriction I pass to foobar process_locations_async is not making any effect, and I overlooked that. additional filter of incoming filenames added, version 0.6 re-uploaded...


Damn ...that's fast!
How I'd wish to have 1/4 of your programming skills man!
Thank you very much... everything's working ok now! wink.gif
oblikoamorale
QUOTE(bubbleguuum @ Mar 31 2008, 21:46) *

I got the plugin to crash foobar several times by enqueuing a directory (in
the www file broswer)


does it happen during or after enqueuement process? can you try to add the same directory in foobar by File/Add Folder?
perhaps there is a specific file causing the crash, for example, in my system foobar crashes on attempt to enqueue any avi file, getting access violation in an external activex module.

I've uploaded the current version (just in case), please use it if you decide to spend a time on this problem.


Chipcui, thanks, but there's really nothing to wish for, believe me...
Chipicui
a minor thing though;
I can reproduce the same crash reported above, while enqueueing directories. Foobar reports it as coming from foo_http...
It's my one and only issue with this wonderful plugin...
RainDawg
Excellent plugin. I think this will fit nicely into a little idea I had to turn my iPhone into a foobar2000 remote control....something that I could use to change songs from the backyard during a party, or as part of a complex nerdy seduction scheme.

I do have two questions.

1- Is there a security risk with this component? I see that I can browse through my entire computer. Clearly with the plugin itself there is little that can be done with those information, but having an index of the entire contents of my discs strikes me as a bit unsettling, especially when that is being exposed to the world. I realize that with a router this information is behind a firewall, which then restricts my intended use to Wi-Fi and using the "masked" IP address of my PC.

2- How difficult would it be to compress the webpage down to a viewport typically used in mobile webapps? I only did a cursory look at the code in the html pages; I am wondering if I should head down that road and create a solution for those of us using the iPhone/touch or not.
foo_peter
that's fast!

tested Firefox 2.0.0.13


IPB Image
oblikoamorale
QUOTE(RainDawg @ Mar 31 2008, 23:34) *

1- Is there a security risk with this component? I see that I can browse through my entire computer. Clearly with the plugin itself there is little that can be done with those information, but having an index of the entire contents of my discs strikes me as a bit unsettling, especially when that is being exposed to the world. I realize that with a router this information is behind a firewall, which then restricts my intended use to Wi-Fi and using the "masked" IP address of my PC.


if i were you, I wouldn't expose it to zeh whole internets without protecting it by proper means you noted, as it initially never been planned to be made bulletproof and used outside the trusted localnet. of course there might be unexpected vulnerability problems in my code or, for example, in the network library I use.

QUOTE(RainDawg @ Mar 31 2008, 23:34) *

2- How difficult would it be to compress the webpage down to a viewport typically used in mobile webapps? I only did a cursory look at the code in the html pages; I am wondering if I should head down that road and create a solution for those of us using the iPhone/touch or not.

the only hardcoded thing in template file is the playlist by itself. the rest is up to you, downsize it as you wish.
anyway I guess playlist, even a small one, wouldn't be much of use on mobile phone screen...

2 all - currently I'm clueless about the crash. I enqueued my whole hdd a few times to no crashing luck.
steliyan
I got this error, when connect to http://localhost:8888/:
CODE
failed to read file: components/foo_httpcontrol_controls_tpl.html


No errors in the console, I copied all files in /components dir. Same error with Firefox and Internet Explore. Using v0.9.5.1 with default_ui.
Chipicui
My god!!! laugh.gif laugh.gif laugh.gif
(almost crying)... I can't believe it.... It's by far, the best "customer's service" wink.gif I've ever had...
Everything's working ok now... and I mean EVERYTHING, even in my Palm!!!.
Now I have the remote control I've been looking for so long!!!!


THANKS THANKS and THANKS AGAIN!!!!


Chipicui
oblikoamorale
QUOTE(steliyan @ Apr 1 2008, 19:08) *

I got this error, when connect to http://localhost:8888/:
CODE
failed to read file: components/foo_httpcontrol_controls_tpl.html


No errors in the console, I copied all files in /components dir. Same error with Firefox and Internet Explore. Using v0.9.5.1 with default_ui.


please check that you have a proper working directory in foobar shortcut properties -- it should be pointing at foobar dir and nowhere else.

Chipicui - I'm glad I've been something remotely close to of use smile.gif
steliyan
Thanks, that was the problem. wink.gif
oblikoamorale
I guess this one is going to last for a real while now...
CODE

v0.62 03 Apr 2008
    add: usability improvements;
    fix: additional safety checks;
Chipicui
Many thanks...
We can change playlists!

Nice work! smile.gif
AndyCar
QUOTE(oblikoamorale @ Apr 3 2008, 00:18) *

I guess this one is going to last for a real while now...
CODE

v0.62 03 Apr 2008
    add: usability improvements;
    fix: additional safety checks;



I must say- Now I'm falling in love with this sexy plug-in biggrin.gif
BTW, may be it's good idea to post info about this plugin here
(oblikoamorale, C'mon you must be russian too wink.gif
oblikoamorale
couldn't resist fixing things I ran on by myself, sorry.
CODE

v0.63 05 Apr 2008
    add: clickable path in browser;
    add: previously played track is highlighted in playlist;
    fix: list of playlists wasn't always updated;
    fix: additional safety checks and fixes;
alphaex32
It would be awesome if someone made a template for this formatted for the iphone/ipod touch.
RainDawg
QUOTE(alphaex32 @ Apr 5 2008, 19:25) *

It would be awesome if someone made a template for this formatted for the iphone/ipod touch.


There is a very good chance that I will take exactly this project on, though not for the next few months. I just recently purchased a house, so the majority of my time away from work will be tied up for the time being. However, I just can get over how cool it would be to be able to change the music from anywhere in the house....just as a cool party gag smile.gif.

So guaranteed that if someone else doesn't do a better job than I could before I get a chance to do some tweaking of the code, I'll do my best to build something that I think fits nicely on the screen.
alphaex32
Well, if you're planning to make a whole project of it, maybe a native iphone app would be the best way to go.
oblikoamorale
CODE

v0.64 08 Apr 2008
    add: basic http auth;
    add: preferences page moved to tools section;
    fix: too small seekbar;
    fix: some glitches and optimizations here and there;
Chipicui
Thank you!
It's getting better and better...
pIv
When current song highlighted with gray in playlist - around previous song box is drawing.

My suggestion highlight with color and box drawing only current playing song!
carmenm
Hi, i just tried this component and i like it a lot!!!!.
I found a little thing bugging me, if i am connected from the web:
- i start playing from the web
- playing start on my foobar, and the web interface refresh itself
- i pause from foobar
- foobar pauses itself but the web interface doesnt refresh itself!

The other thing is a feature request:
- possibility to draw the album art

I was thinking we might even be able to retrieve artist infos from last.fm .... (it would the last coolest feature wink.gif)

Thanks for your great work!
oblikoamorale
QUOTE(pIv @ Apr 9 2008, 10:41) *

When current song highlighted with gray in playlist - around previous song box is drawing.
My suggestion highlight with color and box drawing only current playing song!

you can modify the appearance or even get rid of previously played track indicator by editing the css section of foo_httpcontrol_controls_tpl.html.

QUOTE(carmenm @ Apr 9 2008, 11:37) *

I found a little thing bugging me, if i am connected from the web:

cannot reproduce it. only if I understood the problem correctly, of course.
anyway, try this template file, I wonder if the situation improves?

regarding last.fm stuff.... well, maybe. some time, in distant future...
pIv
QUOTE
QUOTE
When current song highlighted with gray in playlist - around previous song box is drawing.
My suggestion highlight with color and box drawing only current playing song!

you can modify the appearance or even get rid of previously played track indicator by editing the css section of foo_httpcontrol_controls_tpl.html.

Big thanks to you. It is very good solution!
carmenm
QUOTE(oblikoamorale @ Apr 9 2008, 17:06) *

QUOTE(carmenm @ Apr 9 2008, 11:37) *

I found a little thing bugging me, if i am connected from the web:

cannot reproduce it. only if I understood the problem correctly, of course.
anyway, try this template file, I wonder if the situation improves?

regarding last.fm stuff.... well, maybe. some time, in distant future...

i cant access the file.
To sum up my problem, is there a way for foobar on the "server" machine to force refresh of the webpage on the "client" machine when doing something like play or stop?
oblikoamorale
QUOTE(carmenm @ Apr 9 2008, 23:47) *

To sum up my problem, is there a way for foobar on the "server" machine to force refresh of the webpage on the "client" machine when doing something like play or stop?

ah, I got it. well, there is no way web page would know about changed foobar state without reconnecting. so it is not a bug, really.

2all: there was a typo in 0.64 template file which led to unclickable playlist. typo is fixed, 0.64 re-uploaded.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.