Discussion Forums  >  Uncategorized

Replies: 8    Views: 651

andypanda
I hate code!
Profile
Posts: 24
Reg: Dec 31, 2010
California
240
03/30/11 03:00 PM (14 years ago)

Steaming Video & Streaming Audio

Hello again and I know this may sound like splitting hairs but for my own clarification under the features section, are we really streaming video/audio or is it a continuous download? The reason I ask is for apps I am working on, it is important to have the fastest possible buffering and as your know there are many streaming services that promote fast media downloads. Any info would be helpful. Thanks again.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/30/11 03:24 PM (14 years ago)
I also have a question about streaming audio... is there a way in xcode to make the file loop? I have a cpr metronome in my app and the initial file I downloaded was 10 min long at about 3mb. I cut it down to a minute but would like to even go less if I could get it to continuously loop. Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 03:34 PM (14 years ago)
@ andypanda This is a good question. The answer... it depends on what screen your using and the source of the audio. Talking v1.5 here. Assuming background audio or Streaming Audio. If you enter a URL to a sound file, a 'file based' approach, it will download and save then play, so not exactly streaming. However, if you enter a URL to a stream that provides .mp3 encoded data - it will stream nearly immediately. This is the same approach as entering a URL in a Custom URL screen where the navite browser - style audio player handles the stream. You could also add a simple html 5 code snippet to a Custom HTML page and let the native browser stream the source. Confusing eh' @ mutzy Entering -1 for the 'repeat times' should enable continuous looping.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/30/11 03:44 PM (14 years ago)
I searched the BT_screen_audio.m file for repeat times and nothing popped up. Is it in a different file?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/30/11 03:53 PM (14 years ago)
Ah... 'repeat times' is for Background Audio, not BT_screen_audio. My mistake. To loop forever... add this to BT_screen_audio.m just above the [self.audioPlayer setNumberOfLoops:-1]; [self.audioPlayer prepareToPlay]; First should be on or about line 426. Just put it above the 'prepare to play' line
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/30/11 04:08 PM (14 years ago)
Perfect! This thing is finally coming together!!
 
quanstar
I hate code!
Profile
Posts: 2
Reg: Jan 21, 2011
Atlanta, GA
20
like
06/02/11 01:13 AM (14 years ago)
I'm glad that i just found this
 
erickgrau
Aspiring developer
Profile
Posts: 8
Reg: Dec 18, 2011
NYC
80
like
12/23/11 11:47 AM (14 years ago)
Any ways or work around for streaming live content via a .m3u file? (Wincast, WinAMp, Shoutcast, etc) I'm currently doing it via a Custom URL, but the feature set is very limited doing it this way. I lose the background picture and ability to keep it playing even after the app changes to other menus or other apps. Any help would be great! Erick
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
04/11/12 08:17 AM (13 years ago)
Can this modification be used for looping a video as well?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.