rejetto forum

Tiles and Stripes, the gallery view

danny · 11 · 8655

0 Members and 1 Guest are viewing this topic.

Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
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 script. 
« Last Edit: April 25, 2021, 10:17:26 PM by danny »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
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.


Offline easyspot

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
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


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
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
« Last Edit: September 13, 2020, 09:31:22 PM by dj »



Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
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!!


Offline easyspot

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
sorry for asking alot. is this legacy audio player can play flacs? maybe with some modifications? thanks


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
why not simply test it? Add mime: audio/flac
Yes
Also add 'flac' to the audio-array in the template ['.mp3','.ogg','.m4a','.aac']
« Last Edit: October 24, 2020, 02:47:27 PM by dj »


Offline easyspot

  • Occasional poster
  • *
    • Posts: 14
    • View Profile
why not simply test it? Add mime: audio/flac
Yes
Also add 'flac' to the audio-array in the template ['.mp3','.ogg','.m4a','.aac']

not working lol :p


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
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. 😝
« Last Edit: October 31, 2020, 04:03:07 AM by dj »


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
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. 
« Last Edit: April 25, 2021, 10:13:43 PM by danny »