hi guys...i have a issue with something..i bought this app template called the band...is a music app...i changed the songpath to my amazon web services bucket...and i put the music url on the file..
var config = { name: 'theBand', //Put here the name of the band. autoPlay: true, //play music on app launch //Start and finish paths with a slash '/' photosPath: '/content/photos/', //folder for photos and main pictures imagesPath: '/content/imgs/', //folder for icons, buttons and small images songsPath: 'https://console.aws.amazon.com/s3/home?#', //audio files YouTube: { author: 'GuitarLessons365', //Put here your youtube user orderBy: 'published', //sort options: relevance || published || viewCount || rating useNativePlayer: false //false: play video inside the app in a webview, true: launches YouTube native app } }; var imgs = config.imagesPath; //shortcut for images path //tab icons config.tabIcons = { tabIntro: imgs + 'tabIntro.png', tabMusic: imgs + 'tabMusic.png', tabVideos: imgs + 'tabVideos.png', tabPhotos: imgs + 'tabPhotos.png', tabMore: imgs + 'tabMore.png' }; // "More" section links. // Define here the links you want to appear in "more" section. // you can define these parameters: //- winTitle: a title for the modal window where launch the link //- title: the text besides the icon image. Leave blank if you want to show only icons //- web: the web url where the new window should go. //- mail: your e-mail account if you want let the user send you e-mails. Use only in one row and do not define "web" for that row. //- height: the height of the row, usually determined by the icon image height //- leftImage: the image icon //and any other Ti.UI.TableViewRow property var selectionStyle = Ti.UI.iPhone.TableViewCellSelectionStyle.NONE; config.moreLinks = [ {winTitle:'Facebook', web:'http://www.facebook.com/AppceleratorTitanium', height:53, leftImage: imgs + 'ico_fb.png', selectionStyle:selectionStyle}, {winTitle:'Twitter', web:'http://www.twitter.com/criteriastudio', height:48, leftImage: imgs + 'ico_twitter.png', selectionStyle:selectionStyle}, {winTitle:'MySpace', web:'http://www.myspace.com/oficialdangel', height:55, leftImage: imgs + 'ico_myspace.png', selectionStyle:selectionStyle}, {winTitle:'Vimeo', web:'http://www.vimeo.com/appcelerator', height:55, leftImage: imgs + 'ico_vimeo.png', selectionStyle:selectionStyle}, {winTitle:'YouTube', web:'http://www.youtube.com/oficialdangel', height:44, leftImage: imgs + 'ico_youtube.png', selectionStyle:selectionStyle}, {winTitle:'e-mail', mail:'info@criteriastudio.com', height:51, leftImage: imgs + 'ico_mail.png', selectionStyle:selectionStyle}, //define html file for biography in i18n folder, key 'bio_file'. This way you can define a file for each language supported. {winTitle:L('biography'), web:L('bio_file'), height:58, leftImage: imgs + 'ico_bio.png', selectionStyle:selectionStyle} ]; //Use iTunes Link Maker to create your itunes links (copy & paste "song links" from this url) //http://itunes.apple.com/linkmaker/ config.data = { SONGS : [ {title: '1. Song 1', file: 'https://s3.amazonaws.com/music1127/DJ+Flow+-+June+Dembow+Mix+-+LMP.mp3'}, {title: '2. Song 2', file: '2.mp4'}, {title: '3. Song 3', file: '3.mp4'}, {title: '4. Song 4', file: '4.mp4'} ], //Array with the images shown in init window (the first you see when launch the app) introImages : [ 'v-1.png', 'v-2.png', 'v-3.png', 'v-4.png', 'v-5.png', 'v-6.png' ], //Photo gallery images photosImages : [ 'h-1.jpg', 'h-2.jpg', 'h-3.jpg', 'h-4.jpg', 'h-5.jpg', 'h-6.jpg', 'h-7.jpg', 'h-8.jpg', 'h-2.jpg', 'h-3.jpg', 'h-4.jpg', 'h-5.jpg', 'h-6.jpg', 'h-7.jpg', 'h-8.jpg', ], //thumbnails for photosImages. (note that introImage does NOT have thumbnails) photosThumbnails : [ 'h-1_mini.jpg', 'h-2_mini.jpg', 'h-3_mini.jpg', 'h-4_mini.jpg', 'h-5_mini.jpg', 'h-6_mini.jpg', 'h-7_mini.jpg', 'h-8_mini.jpg', 'h-2_mini.jpg', 'h-3_mini.jpg', 'h-4_mini.jpg', 'h-5_mini.jpg', 'h-6_mini.jpg', 'h-7_mini.jpg', 'h-8_mini.jpg', ] }; //end of theBand.data module.exports = config;
1 Answer
Hi Ronny!
-you can use this code, it works perfect for me, please test it
remote_url = 'http://www.blabla.com/sample.mp3'; var sound = Titanium.Media.createAudioPlayer({ url : remote_url, preload : true, paused : true, stateDescription : 'Playing Mp3 Media', }); sound.start();
Your Answer
Think you can help? Login to answer this question!