Member
Member
micheall   2014-03-28, 07:01
#1

I see that for objects we have isImage and isVideo checks, is there an option or method for audio files such as isMP3 or isOgg?

I assume that it's in the jplayer plugin somewhere as if I disable jplayer the .mp3 files don't show in the album but if I have it enabled they do.

Administrator
Administrator
acrylian   2014-03-28, 16:42
#2

The video players (or plugins for other formats) register the formats they are capable to handle for Zenphoto. The check is actually done by the suffix, trusting the file is what it says (otherwise you have to parse them to find out, which as you might imagine could be quite some overhead on larger files).

We have a standard function to extract that:
http://www.zenphoto.org/documentation/functions/_functions-basic.php.html#functiongetSuffix

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.