Widget:MusicPlayer

This widget is used by Template:MusicBox to display a music player from either Bandcamp or SoundCloud. var span = document.getElementById('player'); var jdomain = ''; var jtrack = ''; var bandcamp1 = 'https://bandcamp.com/EmbeddedPlayer/album=2324928055/size=small/bgcol=333333/linkcol=ffdb0c/artwork=none/track='; var bandcamp2 = '/transparent=true/'; var soundcloud1 = 'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/'; var soundcloud2 = '&color=ffdb0c&auto_play=false&hide_related=true&show_comments=false&show_user=false&show_reposts=false'; if (jdomain == 'bandcamp') { var fulldomain = bandcamp1.concat(jtrack,bandcamp2); } else if (jdomain == 'soundcloud') { var fulldomain = soundcloud1.concat(jtrack,soundcloud2); } var iframe = document.createElement('iframe'); iframe.src = fulldomain; iframe.width = 300; iframe.height = 42; iframe.frameBorder = 0; span.appendChild(iframe);