diff --git a/wrappers/soundcloud/popcorn.HTMLSoundCloudAudioElement.js b/wrappers/soundcloud/popcorn.HTMLSoundCloudAudioElement.js index 904e7d4d0..14a0461ff 100644 --- a/wrappers/soundcloud/popcorn.HTMLSoundCloudAudioElement.js +++ b/wrappers/soundcloud/popcorn.HTMLSoundCloudAudioElement.js @@ -13,14 +13,14 @@ function isSoundCloudReady() { // If the SoundCloud Widget API + JS SDK aren't loaded, do it now. if( !scLoaded ) { - Popcorn.getScript( "https://w.soundcloud.com/player/api.js", function() { - Popcorn.getScript( "https://connect.soundcloud.com/sdk.js", function() { + Popcorn.getScript( Popcorn.SOUND_CLOUD_API_JS, function() { + Popcorn.getScript( Popcorn.SOUND_CLOUD_SDK_JS, function() { scReady = true; // XXX: SoundCloud won't let us use real URLs with the API, // so we have to lookup the track URL, requiring authentication. SC.initialize({ - client_id: "PRaNFlda6Bhf5utPjUsptg" + client_id: Popcorn.SOUND_CLOUD_CLIENT_ID }); var i = scCallbacks.length; @@ -701,4 +701,8 @@ return type === "audio/x-soundcloud" ? "probably" : EMPTY_STRING; }; + Popcorn.SOUND_CLOUD_CLIENT_ID = Popcorn.SOUND_CLOUD_CLIENT_ID || "PRaNFlda6Bhf5utPjUsptg"; + Popcorn.SOUND_CLOUD_SDK_JS = Popcorn.SOUND_CLOUD_SDK_JS || "https://connect.soundcloud.com/sdk.js"; + Popcorn.SOUND_CLOUD_API_JS = Popcorn.SOUND_CLOUD_API_JS || "https://w.soundcloud.com/player/api.js"; + }( Popcorn, window, document ));