playlists

mediaelement.js and custom playlist

痴心易碎 提交于 2019-12-02 17:19:11
I have such code (for example): <script> $('audio').mediaelementplayer(); </script> <audio id="mejs" controls="controls"> <source src="/media/file-2.mp3" type="audio/mp3" /> </audio> <ul class="mejs-list"> <li>/media/file-1.mp3</li> <li class="current">/media/file-2.mp3</li> <li>/media/file-3.mp3</li> </ul> I need to play audio files from the list by queue (one after another). How can I change the source of the audio for the next file from the list after finishing playing current file and start playing the next one? Update : related topic about mediaelement.js and playlist but the answer is

Spotify Apps API: Library-class won't return users Playlists

一个人想着一个人 提交于 2019-12-01 12:26:38
问题 I'm trying to get an array containing all Playlists in the users Library (http://developer.spotify.com/download/spotify-apps-api/reference/dcdebc652c.html). No problems with the other class properties (albums, artists, starredPlaylist, tracks), but somehow the "Playlists" property won't work using var allPlaylists = models.library.playlists; whereas var allArtists= models.library.artists; works just fine!( Both using document.write(var) ) Any suggestions? thank you! 回答1: Here's the official

Querying Playlist from MediaStore

匆匆过客 提交于 2019-12-01 01:45:12
I'm trying to query playlists in the device from MediaStore. I have followed a question asked before but I didn't get the answer. This is how I query for playlists public void addToPlaylist(long playlistId, Context context, ArrayList<Play> playlistTracks, String playlistName) { int count = getPlaylistSize(playlistId, context); Log.d("playlist size=", "" + count); ContentValues[] values = new ContentValues[playlistTracks.size()]; for (int i = 0; i < playlistTracks.size(); i++) { values[i] = new ContentValues(); values[i].put(MediaStore.Audio.Playlists.Members.PLAY_ORDER, i + count + 1); values

Given an Android music playlist name, how can one find the songs in the playlist?

纵然是瞬间 提交于 2019-11-27 08:58:13
The playlist names can be found by a query on MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI and then look at the MediaStore.Audio.PlaylistsColumns.NAME column. There is a data column too, MediaStore.Audio.PlaylistsColumns._DATA, but it is returning null. The list of songs ( MediaStore.Audio.Media.EXTERNAL_CONTENT_URI/id ) do not seem to show any playlist affiliation. Here is a bit from my program: The gist is that you need the id for the playlist to grab the songs. Basically you can take my code and change the where statement to .NAME +" = '"+name+"'", private Cursor getPlaylists(String