Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. aud.onerror = function() {
  2. console.log('cant')
  3. whateverFunctionThatDealsWithHandleSongSourcesShit('SoundCloudNonstreamable')
  4. }
  5. aud.addEventListener('loadeddata', function() {
  6. // I DIDN'T have an issue
  7. whateverFunctionThatDealsWithHandleSongSourcesShit('SoundCloud')
  8. });
  9.  
  10. function doubleCheckSource(src) {
  11. streamable = true;
  12. $('#tester').attr('src', src + '?client_id=7af759eb774be5664395ed9afbd09c46');
  13. }
  14.  
  15. function handleSongSource(song) {
  16. if(song.source == 'SoundCloud') {
  17. if(song.audioSource) {
  18. doubleCheckSource(song.audioSource);
  19. } else {
  20. return 'SoundCloudNonstreamable';
  21. }
  22. } else {
  23. return song.source;
  24. }
  25. // if(song.source == 'SoundCloud') return song.audioSource ? 'SoundCloud' : 'SoundCloudNonstreamable';
  26. // return song.source;
  27. }
  28.  
  29. function whateverFunctionThatDealsWithHandleSongSourcesShit(songsource) {
  30. if(songsource = 'waitingOnSoundCloud') {
  31. return false; (basically, do nothing)
  32. }
  33. // blah blabh whatever else happens happens down here.
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement