This project has moved. For the latest updates, please go here.

Problem : Background Audio on version 1.5.3.0

Jul 17, 2015 at 5:20 PM
Edited Jul 17, 2015 at 5:23 PM
Hello,

When I use the sample of Windows 8.1 (HSL and the other sample) if I enable AudioCategory="BackgroundCapableMedia".

When I suspend the application whe can listen the video 1 or 2 minutes and after the video is not read.
I use m3u8 video for my test.

How can we fix this strange behavior?

Thank by advance.

Jérôme.

PS: thank you for this assembly without your DLL I didn't make video player on Windows 8.
Coordinator
Jul 31, 2015 at 9:21 AM
You're welcome.

I've looked at this a couple of times but never got anywhere. One thing I haven't tried: If you are still sending video samples while it is in the background, it may eventually clog up. Perhaps one should discard video samples when going into the background? A simple way to test this would be to play an audio-only stream and see if it also stops playing for not apparent reason.

One might also try digging through the related MSDN docs. It may have been updated since the last time I did so.


Hmmm... Are the MediaControl events wired up?
Aug 8, 2015 at 12:51 PM
Hello,

One thing I haven't tried: If you are still sending video samples while it is in the background

Yes I have this bug only when I still sending the video samples whiles it is in the background.
I have try with audio only stream and it's work perfectly.

Do you think you can throw the video sample and only take the sound when the player is in background?

How can I detect the app go in background? Maybe I can try to switch to audio only when the user put it in background.
I try to register to "Application.Current.Suspending" but it's doesn't fire when the app goes to background.

Hmmm... Are the MediaControl events wired up?

I register to this 3 events :
player.MediaClosed += Player_MediaClosed;
player.MediaEnded += Player_MediaEnded;
player.MediaFailed += Player_MediaFailed;

And they are never fire when I am in background.

If you want to talk about it by mail my mail is : archeone@gmail.com. I can show you easly how to reproduce it. If I can help to fix it I will be happy to do that.