Ashish Bhomia
Ashish Bhomia

Reputation: 1

AudioSessionGetProperty ('tfac') failed with error: 'tahw'"

I am getting following error when play video from url:-

"[0x3c8eb18c] Received corrupt data. Property list is NULL 2014-03-06 16:26:30.980[2034:60b] 16:26:30.980 ERROR: [0x3c8eb18c] AVAudioSessionUtilities.h:88: GetProperty_DefaultToZero: AudioSessionGetProperty ('tfac') failed with error: 'tahw'".

I get this error when post video from app to server and after uploading I get the url and play in mpmovieplayercontroller. but if I close the app and run that video it works fine.

If any person knows about it plz let me know. thanks

Upvotes: 0

Views: 2487

Answers (2)

Jitendra
Jitendra

Reputation: 5081

First you need to import the Audio Tool box framework to your App. In you .h file add the below line i.e.
#include <AudioToolbox/AudioToolbox.h>

Now in your .m file in viewDidLaod() add the below code

  UInt32 allowMixing = true;
        AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers, sizeof(allowMixing), &allowMixing);

  [self.moviePlayer setUseApplicationAudioSession:NO];

Upvotes: 0

Brandon
Brandon

Reputation: 183

I had this issue and was stumped for quite a while. In the end I found that my AVAudioSession was configured for recording instead of playback. Setting it to playback before loading the video solved my problem. Hope this helps!

// Configure audio session
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];

Upvotes: 1

Related Questions