rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: danny on July 26, 2020, 11:51:14 AM

Title: Tiles and Stripes, the gallery view
Post by: danny on July 26, 2020, 11:51:14 AM
For HFS 2.4 RC5/6/7...

Tiles-n-Stripes template is for development/testing purposes (not for main server). 
Tiles/Gallery layout may cause a couple of problems:
1).  On a fast connection, the amount of data (if page scroll+download/archive) can jam the ui and get stuck.
2).  On a slow connection, the amount of incomplete requests can snowball an overlarge 'todo' list; also stuck.

For problem#1, it was rewritten with micro-delay timers between retries and between rows of lazyload photo tiles.  This avoids the fast-connection-stuck problem, by providing some slack-time for other functions to run (ui-screen-update, list, uploads, multiple-users, etc.).   So, it can work for localhost/local-lan test and other fast connections.  Do see the updated lazyload script.

For problem#2, your clients have a variety of connection speeds, so this template might not be suitable for use over the internet. 
Possible fixes include ondemand (not implemented) whereby no tiles are shown until user clicks to see tiles on current page.  And, speed adaptive tile size, whereby the tiles get much larger size and margins for slow connections, so they could load faster if fewer fit on screen (not implemented because no client speed measure available).  If you want to put it to work, you could use the WatchCat (http://rejetto.com/forum/index.php?topic=12055.msg1065322#msg1065322) script. 
Title: Re: Tiles and Stripes, the gallery view
Post by: rejetto on August 01, 2020, 06:28:19 PM
i noticed that problem 1 (not restricted to this template) especially on local networks (as they are faster) and seems to be solvable by setting a limit on the server.
Example, if you reach (using HFS) 50, you may get a sensible improvement already by setting 50 as a limit, and even better if you lower it.
Title: Re: Tiles and Stripes, the gallery view
Post by: easyspot on September 11, 2020, 07:27:59 PM
This template looks just like throwback but simpler n have the same music player bug:
when play a song from folder A til lets say 01:23, then play a song from folder B, then the song from folder B will continue from 01.23, not start from 00:00.
I'm looking for the way to reset to 00:00 but can't found it. any clue? thanks
Title: Re: Tiles and Stripes, the gallery view
Post by: dj on September 11, 2020, 10:42:44 PM
it's my "legacy" audioplayer :)
it happens, if you set shuffle=0
the player remembers last played song and position, so you can later continue with your hearbook, but it's not perfect.
to fix it, remove if(!shuffle) audio.currentTime=tmp[1];

alternativly after {audio.src=that; add audio.currentTime=0;

P.S. this player should also work with the default template
Title: Re: Tiles and Stripes, the gallery view
Post by: easyspot on September 12, 2020, 04:22:23 AM
nice... now its working. thanks :D
Title: Re: Tiles and Stripes, the gallery view
Post by: danny on September 15, 2020, 01:51:54 PM
it's my "legacy" audioplayer :)
it happens, if you set shuffle=0
the player remembers last played song and position, so you can later continue with your hearbook, but it's not perfect.
to fix it, remove if(!shuffle) audio.currentTime=tmp[1];

alternativly after {audio.src=that; add audio.currentTime=0;

P.S. this player should also work with the default template
Thanks DJ!!
Title: Re: Tiles and Stripes, the gallery view
Post by: easyspot on October 24, 2020, 11:41:04 AM
sorry for asking alot. is this legacy audio player can play flacs? maybe with some modifications? thanks
Title: Re: Tiles and Stripes, the gallery view
Post by: dj on October 24, 2020, 01:44:38 PM
why not simply test it? Add mime: audio/flac
Yes (https://caniuse.com/flac)
Also add 'flac' to the audio-array in the template ['.mp3','.ogg','.m4a','.aac']
Title: Re: Tiles and Stripes, the gallery view
Post by: easyspot on October 30, 2020, 02:43:41 PM
why not simply test it? Add mime: audio/flac
Yes (https://caniuse.com/flac)
Also add 'flac' to the audio-array in the template ['.mp3','.ogg','.m4a','.aac']

not working lol :p
Title: Re: Tiles and Stripes, the gallery view
Post by: dj on October 30, 2020, 04:26:58 PM
First try, if your browser supports flac: drag the audio-file to a (new) browser window. If no, try another/newer browser.

If yes, what happens if you click on the audio file in your template. If it downloads, set the mime type in hfs. 😝
Title: Re: Tiles and Stripes, the gallery view
Post by: danny on March 18, 2021, 01:03:48 PM
At post#1, Tiles-n-Stripes-v3b.tpl plays flac.
The file size is smaller because I just copied&pasted some updates from the Stripes template; including login script, error redirection pages, and the music player script too.