remote mp3

You must Login before you can answer or comment on any questions.

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;

— asked 10 months ago by Ronny Rodriguez
3 Comments
  • I have an issue as well.

    Missing from your question are a number of important pieces of information. I suggest you take a look at the Using Questions and Answers article, specifically the Q&A Question Checklist. The missing information is critical to reproducing problems in a test environment and often indicates other factors that cause the undesirable outcome you are experiencing.

    You rarely, clearly explain YOUR issue. Now, early on, you were politely informed that the community wasn't going to write your app for you. Now you want the community to fix your problem with an app template you paid someone else for. Might I suggest you contact the person you paid, for support specific to the template?

    — commented 10 months ago by Stephen Feather

  • Listen i dont know why you bother commeting if you dont want to help....my.issue is simple but i guess i cant ask for help...because that what everyone else does here they paste the code they are having issue...well im having issue trying to play a mp3 from my amazon web services and i just wanted help on that im not asking no one to make me a app here...i got that...so i was asking on how i can play the mp3 from my server..thats all i asked

    — commented 10 months ago by Ronny Rodriguez

  • I will like you to paste me a question that.has been answered with the same exact issue im having

    — commented 10 months ago by Ronny Rodriguez

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();

— answered 10 months ago by Abdus Sattar
answer permalink
3 Comments
  • http://www.blabla.com/sample.mp3 is not proper URL, please place your mp3 proper URL here and then test it.

    — commented 10 months ago by Abdus Sattar

  • in your case. you can put.

    var remote_url = 'https://s3.amazonaws.com/music1127/DJ+Flow+-+June+Dembow+Mix+-+LMP.mp3';
    var sound = Titanium.Media.createAudioPlayer({
        url : remote_url,
        preload : true,
        paused : true,
        stateDescription : 'Playing Mp3 Media',
    });
    sound.start();

    — commented 10 months ago by Abdus Sattar

  • Hi abdul..that is not the issue i did that already and it worked fine...my issue is the code i posted previewsly..you see the ' songpath' part that i dont know what goes there...i have amazon web services and i use the S3..i dont know what i ...have to do in my code to play it from my amazon web service ...thank you for trying to help

    — commented 10 months ago by Ronny Rodriguez

Your Answer

Think you can help? Login to answer this question!