// trackID = file path or URL (shoutcast etc) svoid lavaPlayer_loadItem(DynModule mod, AudioPlayerManager playerManager, AudioPlayer player, S trackID) { playerManager.loadItem(print("Loading track: ", trackID), new AudioLoadResultHandler { public void trackLoaded(AudioTrack track) { temp dm_enter(mod); //player.playTrack(track); player.startTrack(track, false); // start with interrupting playing track print("Started track " + track); } public void playlistLoaded(AudioPlaylist playlist) { temp dm_enter(mod); print("Ignoring play list"); /*for (AudioTrack track : playlist.getTracks()) trackScheduler.queue(track);*/ } public void noMatches() { temp dm_enter(mod); print("Track " + trackID + ": no matches"); } public void loadFailed(FriendlyException e) { temp dm_enter(mod); print("Track " + trackID + " load failed: " + e); printStackTrace(e); } }); }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025345 |
Snippet name: | lavaPlayer_loadItem |
Eternal ID of this version: | #1025345/5 |
Text MD5: | 3397d335e291f5b98aad7368a9ea7762 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-26 17:41:29 |
Source code size: | 1014 bytes / 29 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 223 / 271 |
Version history: | 4 change(s) |
Referenced in: | [show references] |