IPB

Welcome Guest ( Log In | Register )

44 Pages V  « < 2 3 4 5 6 > »   
Reply to this topicStart new topic
foo_httpcontrol, control foobar via http
Cutter
post May 13 2008, 15:43
Post #76





Group: Members
Posts: 266
Joined: 3-December 03
Member No.: 10152



Small request: currently the page refreshes automatically when a song is over and playback jumps to the next item. Fine. However it doesn't refresh if the user changes the playing song using the foobar interface.
Could the plugin send a refresh request each time someone changes the played item (let's say after a 5 seconds delay so the browser doesn't become crazy if I hit "Random" repeatedly)?

This post has been edited by Cutter: May 13 2008, 15:44
Go to the top of the page
+Quote Post
oblikoamorale
post May 13 2008, 16:06
Post #77





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (Cutter @ May 13 2008, 18:43) *
Small request: currently the page refreshes automatically when a song is over and playback jumps to the next item. Fine. However it doesn't refresh if the user changes the playing song using the foobar interface.
Could the plugin send a refresh request each time someone changes the played item (let's say after a 5 seconds delay so the browser doesn't become crazy if I hit "Random" repeatedly)?

communication between plugin and client page in plugin-to-page direction is not possible. things work only in opposite.
Go to the top of the page
+Quote Post
Cutter
post May 13 2008, 16:30
Post #78





Group: Members
Posts: 266
Joined: 3-December 03
Member No.: 10152



What about an element within the webpage code wich would regularly check if the playing song has changed?

This post has been edited by Cutter: May 13 2008, 16:30
Go to the top of the page
+Quote Post
oblikoamorale
post May 13 2008, 16:53
Post #79





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (Cutter @ May 13 2008, 19:30) *
What about an element within the webpage code wich would regularly check if the playing song has changed?

it would require too much work with code redesign as I haven't been planning AJAX'y behaviour from the very start.
I agree that this kind of behaviour would definitely be cool, but considering the fact that the main idea behind this component consists of controlling foobar running on machine you don't want or don't have any alternative access to, it seems a little bit unnneded.
Go to the top of the page
+Quote Post
Cutter
post May 13 2008, 19:26
Post #80





Group: Members
Posts: 266
Joined: 3-December 03
Member No.: 10152



Yeah it would be overkill for quite a little improvement after all.

Another suggestion: could we set the default behaviour of the "playlist action"? I would like it to be set on "Focus" by default and to stay that way when I click on an item (currently it switches back to "Start" everytime).
Go to the top of the page
+Quote Post
oblikoamorale
post May 14 2008, 03:53
Post #81





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (Cutter @ May 13 2008, 22:26) *
Another suggestion: could we set the default behaviour of the "playlist action"? I would like it to be set on "Focus" by default and to stay that way when I click on an item (currently it switches back to "Start" everytime).

replacing the line N 140 in control template file:
CODE
    act = [LAST_ACTION];

with
CODE
    act = 3;

would do the trick
Go to the top of the page
+Quote Post
Cutter
post May 14 2008, 10:33
Post #82





Group: Members
Posts: 266
Joined: 3-December 03
Member No.: 10152



Thanks.
Go to the top of the page
+Quote Post
oblikoamorale
post May 17 2008, 06:25
Post #83





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



I've organised some kind of radio streaming jukebox on localnet, and in terms of privacy it seems convinient to have a certain list of visible directories in file browser instead of all hard drive.
CODE
    v0.70 17 May 2008
        fix: failed reading template files when foobar path contained non-ascii characters;
        add: default playlist action reverts to 'Start' after any non-playlist related action;
        add: display of playback queue length;
        add: restrictive list of directories allowed to browse;
Go to the top of the page
+Quote Post
Hancoque
post May 17 2008, 06:53
Post #84





Group: Members
Posts: 291
Joined: 27-January 04
From: Germany
Member No.: 11530



A small feature request: I'd like to be able to show only files with extensions that foobar2000 supports. Right now I'm just hiding unsupported file types via CSS, but that only fools the average Joe as the file names are still visible in the HTML source.

And another small request: Could you make it possible to separate HTML, CSS and JavaScript into different files? That would make it much easier to maintain customizations to the code. Defining a subdirectory in the components directory that would behave like the root directory of a "normal" web server would be great as it would also allow graphics to be used or any other files.

This post has been edited by Hancoque: May 17 2008, 07:03
Go to the top of the page
+Quote Post
oblikoamorale
post May 17 2008, 12:28
Post #85





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (Hancoque @ May 17 2008, 09:53) *
A small feature request: I'd like to be able to show only files with extensions that foobar2000 supports. Right now I'm just hiding unsupported file types via CSS, but that only fools the average Joe as the file names are still visible in the HTML source.

what exactly for do you need this, may I ask? it's just that this thing is intended for personal use where seeing non playable files in list means no harm, I think.
QUOTE (Hancoque @ May 17 2008, 09:53) *
And another small request: Could you make it possible to separate HTML, CSS and JavaScript into different files? That would make it much easier to maintain customizations to the code. Defining a subdirectory in the components directory that would behave like the root directory of a "normal" web server would be great as it would also allow graphics to be used or any other files.

I'm not motivated and/or interested in going this way. I suppose the better, reliable and much faster way of achieving desired functionality would be a combination of apache, php and foobar COM automation server plugin.

This post has been edited by oblikoamorale: May 17 2008, 12:31
Go to the top of the page
+Quote Post
Hancoque
post May 17 2008, 16:18
Post #86





Group: Members
Posts: 291
Joined: 27-January 04
From: Germany
Member No.: 11530



QUOTE (oblikoamorale @ May 17 2008, 13:28) *
what exactly for do you need this, may I ask? it's just that this thing is intended for personal use where seeing non playable files in list means no harm, I think.
In the distant past people had to bring their CDs to parties. In the not so distant past they brought their external hard drives. But now they can can access all their music without bringing anything. wink.gif I use this plugin in combination with the Icecast server and set foobar2000 to null output and thereby have a remote music jukebox. Though I use password protection I want to leave access open to the "public" after the authentication. But people should do nothing more then to browse my music files. They should definitely not be able to see all my hard drives' contents. And there are music files scattered all over three different drives, so I cannot just restrict access to some folders, or the list of allowed folders would be really long.

QUOTE (oblikoamorale @ May 17 2008, 13:28) *
I'm not motivated and/or interested in going this way. I suppose the better, reliable and much faster way of achieving desired functionality would be a combination of apache, php and foobar COM automation server plugin.
Well, all right.

This post has been edited by Hancoque: May 17 2008, 16:21
Go to the top of the page
+Quote Post
oblikoamorale
post May 17 2008, 17:30
Post #87





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (Hancoque @ May 17 2008, 19:18) *
QUOTE (oblikoamorale @ May 17 2008, 13:28) *
what exactly for do you need this, may I ask? it's just that this thing is intended for personal use where seeing non playable files in list means no harm, I think.
In the distant past people had to bring their CDs to parties. In the not so distant past they brought their external hard drives. But now they can can access all their music without bringing anything. wink.gif I use this plugin in combination with the Icecast server and set foobar2000 to null output and thereby have a remote music jukebox. Though I use password protection I want to leave access open to the "public" after the authentication. But people should do nothing more then to browse my music files. They should definitely not be able to see all my hard drives' contents. And there are music files scattered all over three different drives, so I cannot just restrict access to some folders, or the list of allowed folders would be really long.

eheh, thanks, you've made me chuckle, and that's definitely good! and it's interesting to know someone else is using it as a remote jukebox as well.
I guess one more preferences checkbox hiding non-playable files wouldn't hurt. will do!
Go to the top of the page
+Quote Post
Hancoque
post May 17 2008, 19:34
Post #88





Group: Members
Posts: 291
Joined: 27-January 04
From: Germany
Member No.: 11530



Thanks! smile.gif
Go to the top of the page
+Quote Post
Jorgo
post May 18 2008, 10:52
Post #89





Group: Banned
Posts: 55
Joined: 7-June 06
Member No.: 31596



What for, really? In the foobar Media Library you can already define folders and filemasks... wouldn't this be redundant?
Go to the top of the page
+Quote Post
oblikoamorale
post May 18 2008, 17:02
Post #90





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



probably because the media library access interface is not implemented? or perhaps not everybody is using media library?

Hancoque: I've reuploaded current version with non playable files filter.
Go to the top of the page
+Quote Post
thuneau
post May 18 2008, 20:07
Post #91





Group: Members
Posts: 20
Joined: 18-June 06
Member No.: 31979



This is a very cool component. Thank you very much for making it.
Question 1. I can't see the volume up/down control you added in 0.69. (Firefox 2.0.0.14). How do I add it?
do I replace :
CODE
<select title="Volume level" onchange="pc('Volume',this.value);">[VOLUME_OPTION]</select>%&nbsp;


with

CODE
<select title="Volume Up" onchange="pc('Volume',this.value);">[VOLUME_OPTION]</select>%&nbsp;
<select title="Volume Down" onchange="pc('Volume',this.value);">[VOLUME_OPTION]</select>%&nbsp;


if yes, where do I set the % change per up/down?

Question 2. Could the htm template be skinned using Flash?

Thanks again.
Go to the top of the page
+Quote Post
Hancoque
post May 18 2008, 21:28
Post #92





Group: Members
Posts: 291
Joined: 27-January 04
From: Germany
Member No.: 11530



QUOTE (oblikoamorale @ May 18 2008, 18:02) *
Hancoque: I've reuploaded current version with non playable files filter.
Great! Thanks again. smile.gif
Go to the top of the page
+Quote Post
oblikoamorale
post May 19 2008, 04:05
Post #93





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



QUOTE (thuneau @ May 18 2008, 23:07) *
This is a very cool component. Thank you very much for making it.
Question 1. I can't see the volume up/down control you added in 0.69. (Firefox 2.0.0.14). How do I add it?

it isn't included in the template as it is going to be needed only on rare occasions. to control volume in this way you'll probably want something like
CODE
<input name="VolumeUp" type="button" value="V_Up" onClick="pc(this.name, 20);">
<input name="VolumeDown" type="button" value="V_Down" onClick="pc(this.name, 20);">

where 20 is step in percents.
QUOTE (thuneau @ May 18 2008, 23:07) *
Question 2. Could the htm template be skinned using Flash?

I don't really know how flash works from inside, but I suppose yes, it could. although it would be somewhat hard, I think, as you'll need to parse the html within the flash.
Go to the top of the page
+Quote Post
oblikoamorale
post May 20 2008, 20:59
Post #94





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



it seems that programming a threaded micro-webserver is no big deal at all, and is fun.
although I still have no sound idea what it might be needed for, I've already found one use, to set a page favicon. and foobar stock icon loads perfectly fine in opera smile.gif

btw, latest version has one nice bug: it doesn't display root page in file browser if 'hide non-playables' checkbox is on. but I guess it's ok, as no one noticed it yet.

This post has been edited by oblikoamorale: May 20 2008, 21:02
Go to the top of the page
+Quote Post
oblikoamorale
post May 21 2008, 20:31
Post #95





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



well, at least I can enjoy the favicon now smile.gif
CODE
    v0.71 21 May 2008
        add: multithreaded (restricted up to four simultaneous sessions)
             mini-web-server, able to serve any files from home directory.
             the following mime types are supported: css, gif, htm, html, ico,
             jpg, jpe, jpeg, js, png, xml.
        add: optional logging of remote ip addresses in console;
Go to the top of the page
+Quote Post
Hancoque
post May 21 2008, 22:48
Post #96





Group: Members
Posts: 291
Joined: 27-January 04
From: Germany
Member No.: 11530



So, finally you did it. smile.gif

There is still a problem when trying to separate the JavaScript code from the HTML template, though. The JavaScript code contains markers that are not replaced by the actual code if they are not in the main template file. Also parsing linked JavaScript files would solve the problem.

I'm trying to rewrite the HTML templates to the XHTML 1.1 specification using valid code, but there's one thing I cannot fix in the template: The plugin dynamically inserts checked (for checkboxes) and selected (for drop-down menu options) into the code. XHTML disallows this. Instead checked="checked" and selected="selected" has to be used to produce valid code. What speaks against using XHTML for the templates in general?

If you are willing to convert the templates to valid XHTML, here are some hints to solve issues that break the application in XHTML mode:

1. JavaScript code should be enclosed this way:
QUOTE
//<![CDATA[
...
//]]>

2. The form element must not contain the attributes name and target. Remove the latter altogether and replace the former by id and use document.getElementById('cmd_form') instead of document.cmd_form.

3. The CSS styles width, height and left need to have units specified (like px), otherwise they are not applied if the document is treated as XHTML. Simply adding +"px" to the corresponding JavaScript statements solves the problem:
QUOTE
document.getElementById('np').style.width=Math.floor(np_width * t_sec / t_length)+"px";
QUOTE
height=getElementById("np").offsetHeight*2-2+"px";
left=getElementById("npd").offsetLeft+"px";

4. Write all HTML event handlers small (onload instead of onLoad for example).

Edit: I just finished my XHTML 1.1 compliant (and working) versions of the templates. You might want to take a look: foo_httpcontrol_data.zip

Edit (2): The server sends a charset called utf8. I think it has to be utf-8 instead. The XHTML validator complains that there's a charset mismatch.

This post has been edited by Hancoque: May 21 2008, 23:37
Go to the top of the page
+Quote Post
Ritsl
post May 22 2008, 01:15
Post #97





Group: Members
Posts: 35
Joined: 2-December 06
From: The Netherlands
Member No.: 38275



QUOTE (Hancoque @ May 21 2008, 23:48) *
I'm trying to rewrite the HTML templates to the XHTML 1.1 specification using valid code, but there's one thing I cannot fix in the template: The plugin dynamically inserts checked (for checkboxes) and selected (for drop-down menu options) into the code. XHTML disallows this. Instead checked="checked" and selected="selected" has to be used to produce valid code. What speaks against using XHTML for the templates in general?

What speaks in favor? This is a subject on which holy wars have been fought smile.gif Let's not go there...

QUOTE
2. The form element must not contain the attributes name and target. Remove the latter altogether and replace the former by id and use document.getElementById('cmd_form') instead of document.cmd_form.

3. The CSS styles width, height and left need to have units specified (like px), otherwise they are not applied if the document is treated as XHTML.

This is good advice even for a HTML purist like me. It would also be nice to use a Doctype that doesn't trigger Quirks mode. But this is already in reach of the intrepid customizers. I should try if I can make use of Opera's support for WebForms 2 to create a nicer interface smile.gif

QUOTE
The server sends a charset called utf8. I think it has to be utf-8 instead. The XHTML validator complains that there's a charset mismatch.
Yes, that should be utf-8 indeed, though my browser has no trouble recognizing it as such.
Go to the top of the page
+Quote Post
soulruins
post May 22 2008, 15:14
Post #98





Group: Members
Posts: 4
Joined: 22-May 08
Member No.: 53711



Great plugin! Thanks.

My optimization for iPhone:



Download: http://rapidshare.com/files/116779129/foo_...l_data.zip.html
Go to the top of the page
+Quote Post
oblikoamorale
post May 22 2008, 16:09
Post #99





Group: Developer
Posts: 302
Joined: 24-March 08
Member No.: 52244



soulruins: looks great! very thanks for posting the shot, appreciated.

to those who are concerned, here are the guidelines I think I should be keeping to make customization process transparent:
1. don't generate any html formatted data within the plugin at all. perhaps the pregenerated playl- and file browser lists should be left alive, but necessarily with optional possibility to retrieve raw data, to be formatted on user-side by means of js.
2. move every macro substitution into a single javascript file containing as much foobar state data as possible, in form of defined variables/arrays. therefore including this js into any html page makes the page able to display foobar state information in any form.

perhaps this is an obvious overkill and such heavy relying on js isn't a very bright idea, but this way looks like the only reasonable one to give the user full control of any visual appearance aspect.

any thoughts?
Go to the top of the page
+Quote Post
Hancoque
post May 23 2008, 00:41
Post #100





Group: Members
Posts: 291
Joined: 27-January 04
From: Germany
Member No.: 11530



I think it's no problem to generate (X)HTML code in the plugin *if* the code stays absolutely neutral concerning (X)HTML standards and visual styles. For the case that code differs between HTML and XHTML there might be a checkbox in the plugin options page what to use. But I think it's sufficient to generally conform to XHTML because it has more future potential and can be seen as the successor of HTML 4 where things are more standardized and unified. Concerning visual styles only IDs and classes should be used (no direct formatting).

By the way: I found malformed HTML in the browser list. The first entry ([ .. ]) contains this code:
CODE
<tr colspan=4><td>...</td>
instead of this:
CODE
<tr><td colspan="4">...</td>


This post has been edited by Hancoque: May 23 2008, 00:48
Go to the top of the page
+Quote Post

44 Pages V  « < 2 3 4 5 6 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th July 2014 - 10:04