Not logged in. · Lost password · Register
Forum: Features request RSS
2.04 Suggested Changes
Avatar
Clay #1
Member since Jan 2003 · 91 posts · Location: Seattle, Washington, USA
Group memberships: Members
Show profile · Link to this post
Henry ... BA 2.04 ROCKS!

I've noticed a couple of things that you might want to change. As you can tell I use the Browser window a lot (most of the time).

1. When you use the Browser screen and scroll to the bottom of the right side (browser) frame it scrolls back up to the bottom of the list (rather than staying all the way at the bottom). This is very annoying.

2. The playlist should resize when the frame is widened. The brower side resizes somewhat but could use a little work too.

Thanks a bunch for the new functionality!

Clay

P.S. I think there might be a problem displaying the correct "playing" track when in the browser window ... I haven't replicated it but it seems to display old track information after the track changes.
Avatar
Azimuth #2
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
problem displaying the correct "playing" track when in the browser window
I believe I have also seen this.
Avatar
Henry (Administrator) #3
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
BA 2.04 ROCKS!
:-D Thanks!!
1. + 2.
I'll try it but feel free to modify the skin for your needs. Improvements are always welcome!
...problem displaying the correct "playing" track when in the browser window...
I can explain that: This skin uses only an iframe for the playlist, browser, etc. So whenever I reload the main page the iframe is also reloaded. That would be a pain if you are about to select some files in the browser frame and just before pressing 'add' the page reloads and all your selection is down the drain... That is why I disabled the window refresh when the browser frame is active. But it should be easy for you to enable the reload.
This post was edited on 2003-09-02, 20:51 by Unknown user.
Avatar
Clay #4
Member since Jan 2003 · 91 posts · Location: Seattle, Washington, USA
Group memberships: Members
Show profile · Link to this post
Henry ... I understand what you are saying but please tell me how to reenable the refresh. I use the browser page most of the time and it is very strange to have it showing old information. Can't it only update at the end of the track (like the playlist seems to do)?

Thanks - Clay
Avatar
Henry (Administrator) #5
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
No problem, here is the modified index.html
I named it index2.html but you need to rename it back to index.html

have fun :-D
The author has attached one file to this post:
index2.html 19.6 kBytes
You have no permission to open this file.
Avatar
Azimuth #6
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
Any chance of getting a brief explanation on how ReloadPage() works?  :-D
Avatar
Henry (Administrator) #7
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Maybe... :-p
But I'm off for some days. More information next week.
Avatar
Azimuth #8
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
I await your return with baited breath...  :whistling:

Tony
Avatar
Henry (Administrator) #9
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
OK, I'm back from my (too short) vacation...

Here is the promised short introduction to the new eXtended skin and it's JavaScript secrets :lol: .

The major improvements are that the page uses an 'intelligent' ;) reload to save bandwidth and server load, has several clickable progress bars and works with IE as well as with Netscape browsers.

First it checks the browser application type for Netscape or IE with the following code. That helps getting the progress bars and other important browser dependent things(frame resize, etc) to work.
var Netscape = new Boolean();
if(navigator.appName == "Netscape")  Netscape = true;
else Netscape = false;

After that some other global values we need later are read.
var SecondsRemain = <#SongRemainSec> + <#SongRemainMin>*60;
var TrackPos = <#SongPositionSec> + <#SongPositionMin>*60;
var TotalSeconds = <#SongTotalSec>
var Status = <#status on_play=true on_stop=false on_pause=false>;

After that we have some functions we need/discuss later. At first a short overview:
function ReloadPage()  -  loads the correct frame and sets the reload timer
function RequestPage(url)  -  is called when you click a link, makes sure the correct page is loaded
function UpdateTime()  -  well... periodically updates all times you can see in the browser
function findPosX(obj), function findPosY(obj)  -  returns the absolute position of a html element, needed for Netscape browsers (I found that script somewhere...)
function clickProgressBar(Element, myevent), function clickVolumeBar(Element, myevent), function clickEqualizerBar(whatband, myevent, Element)  -  are called whenever you click a progess/volume/eq bar.
function resetEqualizer()  -  buildt/request the correct url to reset the eq
function resizeFrame()  -  used with Netscape browsers, set spaces to make it look good...

ReloadPage()
After that init phase the browser parses the HTML body and finds the onload= tag where ReloadPage is called.
This function parses the current url for the page=xxx tag representing the page you requested (playlist, browser, options, etc) and depending on the result it loads the requested page in the contentframe. The seconds thing we need to do is to set a timer to reload the whole page. At least 5 seconds should go by before a reload is done. Reload is disabled when viewing the browser frame (see post above). Just remove the comment // to enable refresh in the browser window. At the end this functions sets up the 1 sec timer to update the time displays. How this works is explained in the next paragraph.

UpdateTime()
This function is called every seconds. It increases the track position by one seconds and refreshes the timer displays (elapsed, remaining, progress bar, etc) with some math/string functions to prevent display errors. After that it sets a timer to reload itself after another seconds.

RequestPage(url)
Whenever you click a link this function adds the current page (browser, playlist, etc) to the requested url to keep the reloaded window informed about our current page. A valid function call is: <a href="#play" onClick="javascript:RequestPage('?play');">play</a>

clickProgressBar(Element, myevent), clickVolumeBar(Element, myevent), clickEqualizerBar(whatband, myevent, Element)
They handle the clicks on the several bars around. After calculating the correct value RequestPage(url) is used to commit the changes.


I hope I described the most important parts of this weird script stuff. If you've got any questions, please let me know...

Have fun!!
Avatar
Azimuth #10
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
I'm trying to pick this apart to get just the timer portion. Pointers?

It works for one second, then stops!  :huh:
This post was edited on 2004-05-09, 01:00 by Unknown user.
Avatar
Henry (Administrator) #11
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
if(Status) window.setTimeout("UpdateTime()",1000);
This sets up the timer to refresh the track position. It is called from ReloadPage() when the page is loaded first.

'UpdateTime()' updates the timer display and stuff. Is sets up the timer again to one second.

Both use the global var 'Status' to check if the track is currently playing or not. Maybe there is a problem. Try to remove the 'if(Status)'  in 'UpdateTime()'.
Avatar
Azimuth #12
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
Thanks, Henry. That got me looking at the code harder, and, I found a line that was breaking everything.  :-D
Avatar
Azimuth #13
Member since Jan 2003 · 427 posts · Location: Chicago, Illinois - USA
Group memberships: Members
Show profile · Link to this post
OK! Now, I want to get the progress bar working that way. It looks like you switched the method of making it in the new version of the BA eXtended skin. It seems like progressBarLeft and progressBarRight changed to progressBarCell. Can you help me understand this?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 190.3 ms (87.3 ms) · 99 database queries in 55.5 ms
Current time: 2018-08-19, 02:25:32 (UTC +00:00)