You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have the possibility to easily create a playlist from a local folder filled with audio files.
Idea
one <input type="file" multiple/> would accept a folder, and recursively scan all files to figure out which ones the html media elements can play (<audio> for now).
then it would create a json representation of tracks composing a playlist, that fits the one accepted by the <radio4000-player>
Questions
should this be implemented directly in the radio4000-player
should this also be able to find and read json files, to create a playlist from the right media? For example. a folder test is filled with audio files in different sub folders; when the test folder is imported in the input, it will recurively find all audio files, json files, and image files, that could "enrich" / "rectify" the json representation that the importer is building.
The text was updated successfully, but these errors were encountered:
<metacharset="utf-8"><title>dat ieef</title><radio4000-player></radio4000-player><script>varplayer=document.querySelector('radio4000-player')varvuePlayerplayer.addEventListener('playerReady',()=>{console.info('playerReady');vuePlayer=player.getVueInstance()start()})conststart=async(player)=>{// Get files from current folder.vararchive=newDatArchive(location.href)varfiles=awaitarchive.readdir('/')// Ignore non-audio files.vartracks=files.filter(file=>{if(file.includes('index.html'))returnfalseif(file.includes('radio4000-player.min.js'))returnfalseif(file.includes('dat.json'))returnfalseif(file.includes('.datignore'))returnfalseif(file.includes('.DS_Store'))returnfalsereturntrue})// Create playlist for radio4000-player and load it.varplaylist={title: 'dat 200ok?!',tracks: tracks.map((filePath,index)=>{return{id: `${index}_filePath`,title: filePath,url: location.href+'/'+encodeURI(filePath)}})}vuePlayer.updatePlaylist(playlist)}</script><scriptasyncsrc="https://cdn.jsdelivr.net/npm/[email protected]/dist/radio4000-player.min.js"></script>
Similar to this feature https://github.com/hugurp/dj-booklet
It would be great to have the possibility to easily create a playlist from a local folder filled with audio files.
Idea
<input type="file" multiple/>
would accept a folder, and recursively scan all files to figure out which ones the html media elements can play (<audio>
for now).track
s composing aplaylist
, that fits the one accepted by the<radio4000-player>
Questions
json
files, to create a playlist from the right media? For example. a foldertest
is filled with audio files in different sub folders; when thetest
folder is imported in the input, it will recurively find all audio files, json files, and image files, that could "enrich" / "rectify" the json representation that the importer is building.The text was updated successfully, but these errors were encountered: