Hi all,
I am trying to play a .mp3 file on click of a button using this code:
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?
Thanks,
Monaj
-------
The sample code can be downloaded from here- Sample Code Download Link
One of the example links which I tried was - In the end song
I am trying to play a .mp3 file on click of a button using this code:
Code:
NSString *audioFilePath=[[audioInputTextField stringValue] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *audioUrl = [[NSURL 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?
Thanks,
Monaj
-------
The sample code can be downloaded from here- Sample Code Download Link
One of the example links which I tried was - In the end song