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 is not 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).
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']