Filesystem mp3 source
Reads mp3 files from the filesystem and exposes it as a media source for media related components
Minimal setup
Just enter the base path, where are files located physically, and base url to form publicly accessible url for mp3 files.
Search functionality
If you provide search criteria, the song’s title and artist will be matched against it.
If you provide folder search criteria only, only complete folders will be taken in count.
You also have the ability to adjust the search accuracy in Min. Match Percentage which can be form 0 to 100.
The higher the Min. Match Percentage the more accurate the search query would have to be to give any results for playback.
Media info
Media Context provides media info data which you can use through connected components (e.g. Media info element, Media block).
In these components, you will provide a name under which this data (associative array) will be available and here are the fields it consists of.
- current IAudioFile, current song
- next IAudioFile, next song if exists
- count integer, playlist songs count
- last boolean, is the current song the last
- first boolean, is the current song the first
- song_no integer, current song, starting from 1
- loop_status boolean, is the loop mode enabled
- shuffle_status boolean, is the shuffle enabled
- playing boolean, is the player currently playing
Mp3Id3File (Song Descriptor Class)
Those examples on how to access the various peaces of information, apply to the current and next variables from the Media Info
- getFileUrl() access to the file url from current or next field in the media info
- getSongTitle() access to the song title from current or next field in the media info
- getArtist() access to the artist from current or next field in the media info
- getSongImageUrl() access to the image url from current or next field in the media info
- getSongBackgroundUrl() access to background image url from current or next field in the media info
- getMetadata() access to the metadata from current or next field in the media info
- getMetadata().genre access to the genre from current or next field in the media info
- getMetadata().album access to the album from current or next field in the media info
- getMetadata().year access to the year from current or next field in the media info
- getMetadata().comment access to the comment from current or next field in the media info
Metadata
To view more info about the getMetadata() please visit Mp3Info on Github by wapmorgan.