• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unable to play a .mp3 file directly using QTMovie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to play a .mp3 file directly using QTMovie


  • Subject: Unable to play a .mp3 file directly using QTMovie
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Tue, 5 Oct 2010 17:53:16 +0530

Hi all,

I am trying to play a .mp3 file on click of a button using this code:

 NSString <http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSString.html>
*audioFilePath=[[audioInputTextField stringValue]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];NSURL
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSURL.html>
*audioUrl = [[NSURL
<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSURL.html>
alloc] initWithString:audioFilePath];
QTMovie* soundToPlay = [[QTMovie alloc] initWithURL:audioUrl
error:nil];[soundToPlay play];


Here user is expected to enter a valid url for an audio file in text
field and then click button next to it to play, but it is not working
for me ie. no audio gets played :(

Can anyone suggest me, if I am doing anything wrong?

The sample code can be downloaded from here- http://db.tt/cDjFCZO

One of the example links which I tried was -
http://javamax.free.fr/sonorisation et radio/Linken Park - In The End.mp3
--
Thanks,

Devarshi
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Unable to play a .mp3 file directly using QTMovie
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Partially opaque window with opaque views
  • Next by Date: Re: Confused about floats
  • Previous by thread: Re: NSOutlineView multi cell type binding query
  • Next by thread: Re: Unable to play a .mp3 file directly using QTMovie
  • Index(es):
    • Date
    • Thread