locked
Background audio playback with SystemMediaTransportControls

    Question

  • Hello,

    For background audio playback,

    I set the initilaize function:

    sysControls = SystemMediaTransportControls.GetForCurrentView();
                sysControls.IsPlayEnabled = true;
                sysControls.IsStopEnabled = true;
                sysControls.IsPauseEnabled = true;

    But for some case that APP won't support the media key to show the UI and backgroud audio,

    I set the 3 attributes to false:

    sysControls = SystemMediaTransportControls.GetForCurrentView();
                sysControls .IsPlayEnabled = false;
                sysControls .IsStopEnabled = false;
                sysControls .IsPauseEnabled = false;

    When I reset them(IsPlayEnabled,  IsStopEnabled and IsPauseEnabled) to true, the APP can support media key to control audio but can't playback background audio.

    Is there something wrong for background audio when APP resets the 3 attribute?

    Very thanks.  

    Wednesday, December 18, 2013 8:10 AM

Answers