Guest User

Untitled

a guest
Mar 4th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. aud.onerror = function() {
  2. console.log('cant')
  3. streamable = false;
  4. }
  5.  
  6. function doubleCheckSource(src) {
  7. streamable = true;
  8. $('#tester').attr('src', src + '?client_id=7af759eb774be5664395ed9afbd09c46');
  9. }
  10.  
  11. function handleSongSource(song) {
  12. if(song.source == 'SoundCloud') {
  13. if(song.audioSource) {
  14. doubleCheckSource(song.audioSource)
  15. console.log('.....how')
  16. return streamable ? 'SoundCloud' : 'SoundCloudNonstreamable';
  17. } else {
  18. return 'SoundCloudNonstreamable';
  19. }
  20. } else {
  21. return song.source;
  22. }
  23. // if(song.source == 'SoundCloud') return song.audioSource ? 'SoundCloud' : 'SoundCloudNonstreamable';
  24. // return song.source;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment