Created
June 6, 2014 19:27
-
-
Save ghankerson/53737e81574f173bc73f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($(this.e.currentTarget).hasClass('npr')) { | |
playable = APMPlayerFactory.getPlayable({ | |
title: title, | |
identifier: 'npr:' + $(this.e.currentTarget).data('nprid'), | |
flash_server_url: $(this.e.currentTarget).data('flashserverurl'), | |
flash_file_path: $(this.e.currentTarget).data('flashfilepath'), | |
http_file_path: $(this.e.currentTarget).data('mp3'), | |
type: 'audio' | |
}); | | |
} else { //from APM (not from NPR) | |
playable = APMPlayerFactory.getPlayable({ | |
title: title, | |
identifier: apmUrl, | |
flash_server_url: 'rtmp://ondemand-rtmp.stream.publicradio.org/music', | |
flash_file_path: 'mp3:ondemand' + httpPath, | |
http_file_path: 'http://play.publicradio.org/' + playRef + '/o' + httpPath, | |
type: 'audio' | |
}); | |
} | |
$(this.config.audio).apmplayer_ui('addPlayable', playable); | |
$(this.config.audio).apmplayer_ui('gotoPlaylistItem', playable.identifier); | |
$(this.config.info).addClass('playing'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment