[ 
https://issues.apache.org/jira/browse/CB-9885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15367425#comment-15367425
 ] 

Phuong Too edited comment on CB-9885 at 7/8/16 9:12 AM:
--------------------------------------------------------

Hi [~ghenry22],

Thank you for your comment.
1. The audio play background work now. (follow the link above)

2. On windows phone: 
<Applications>
        <Application Id="com.demo.audio" StartPage="www/index.html">
            <m3:VisualElements BackgroundColor="transparent" 
Description="CordovaApp" DisplayName="demoAudio" ForegroundText="light" 
Square150x150Logo="images\Square150x150Logo.png" 
Square44x44Logo="images\Square44x44Logo.png">
                <m3:DefaultTile Square71x71Logo="images\Square71x71Logo.png" 
Wide310x150Logo="images\Wide310x150Logo.png">
                    <m3:ShowNameOnTiles>
                        <m3:ShowOn Tile="square150x150Logo" />
                        <m3:ShowOn Tile="wide310x150Logo" />
                    </m3:ShowNameOnTiles>
                </m3:DefaultTile>
                <m3:SplashScreen BackgroundColor="#FFFFFF" 
Image="images\SplashScreenPhone.png" />
                <m3:InitialRotationPreference>
                    <m3:Rotation Preference="portrait" />
                    <m3:Rotation Preference="landscape" />
                    <m3:Rotation Preference="landscapeFlipped" />
                </m3:InitialRotationPreference>
            </m3:VisualElements>
            <Extensions>
                <Extension Category="windows.backgroundTasks" 
StartPage="www/js/audio.js">
                    <BackgroundTasks>
                        <Task Type="audio" />
                    </BackgroundTasks>
                </Extension>
            </Extensions>
        </Application>
    </Applications>

addition to the "package.phone.appxmanifest" file.
But I can not build app and got a message:

"Severity Code  Description Project File  Line  Suppression State
Error   DEP0001 : Unexpected Error: Package could not be registered. (Exception 
from HRESULT: 0x80073CF6)"

Severity  Code  Description Project File  Line  Suppression State
Error   DEP6701 : Bootstrapping failed with unexpected error: 'DEP6700 : 
LaunchMsvsmon failed on the device side with error code 0x80070019'.       

Severity  Code  Description Project File  Line  Suppression State
Error   DEP6700 : LaunchMsvsmon failed on the device side with error code 
0x80070019        

If I remove the  code below. Build app is OK.
<Extension Category="windows.backgroundTasks" StartPage="www/js/audio.js">
         <BackgroundTasks>
                 <Task Type="audio" />
         </BackgroundTasks>
</Extension>

Could you help me?
Thank you very much. Have a nice weekend.



was (Author: phuongwd):
Hi [~ghenry22],

Thank you for your comment.
1. The audio play background work now. (follow the link above)

2. On windows phone: 
<Applications>
        <Application Id="com.demo.audio" StartPage="www/index.html">
            <m3:VisualElements BackgroundColor="transparent" 
Description="CordovaApp" DisplayName="getAbstract" ForegroundText="light" 
Square150x150Logo="images\Square150x150Logo.png" 
Square44x44Logo="images\Square44x44Logo.png">
                <m3:DefaultTile Square71x71Logo="images\Square71x71Logo.png" 
Wide310x150Logo="images\Wide310x150Logo.png">
                    <m3:ShowNameOnTiles>
                        <m3:ShowOn Tile="square150x150Logo" />
                        <m3:ShowOn Tile="wide310x150Logo" />
                    </m3:ShowNameOnTiles>
                </m3:DefaultTile>
                <m3:SplashScreen BackgroundColor="#FFFFFF" 
Image="images\SplashScreenPhone.png" />
                <m3:InitialRotationPreference>
                    <m3:Rotation Preference="portrait" />
                    <m3:Rotation Preference="landscape" />
                    <m3:Rotation Preference="landscapeFlipped" />
                </m3:InitialRotationPreference>
            </m3:VisualElements>
            <Extensions>
                <Extension Category="windows.backgroundTasks" 
StartPage="www/js/audio.js">
                    <BackgroundTasks>
                        <Task Type="audio" />
                    </BackgroundTasks>
                </Extension>
            </Extensions>
        </Application>
    </Applications>

addition to the "package.phone.appxmanifest" file.
But I can not build app and got a message:

"Severity       Code    Description     Project File    Line    Suppression 
State
Error           DEP0001 : Unexpected Error: Package could not be registered. 
(Exception from HRESULT: 0x80073CF6)"

Severity        Code    Description     Project File    Line    Suppression 
State
Error           DEP6701 : Bootstrapping failed with unexpected error: 'DEP6700 
: LaunchMsvsmon failed on the device side with error code 0x80070019'.          
                 

Severity        Code    Description     Project File    Line    Suppression 
State
Error           DEP6700 : LaunchMsvsmon failed on the device side with error 
code 0x80070019                            

If I remove the  code below. Build app is OK.
<Extension Category="windows.backgroundTasks" StartPage="www/js/audio.js">
         <BackgroundTasks>
                 <Task Type="audio" />
         </BackgroundTasks>
</Extension>

Could you help me?
Thank you very much. Have a nice weekend.


> windows platform cannot play background audio
> ---------------------------------------------
>
>                 Key: CB-9885
>                 URL: https://issues.apache.org/jira/browse/CB-9885
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin Media
>         Environment: cordova platform windows
> windows 10 universal app
>            Reporter: Gaven Henry
>         Attachments: cordovaMediaBackground.zip
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There are specific requirements to play background audio in a windows 10 
> universal app.  If they are not met then audio will stop whenever the app is 
> minimized or in the background.
> One of these requirements needs to be set on creation of the media object 
> before the source is assigned.
> Need to update the create() method for the windows platform to assign 
> msAudioCategory value so that people CAN enable background audio if they wish.
> This change has no impact on the general use case and audio will continue to 
> behave the same way it currently does UNLESS the user also meets the other 
> requirements in their particular app to enable background audio.
> These requirements are:
> register for media controls
> addition to the package.appxmanifest for your app to specifically enable 
> background audio.
> There is some reference material here for the additional requirements:
> http://blogs.technet.com/b/chadduffey/archive/2014/06/27/implement-background-audio-for-modern-windows-applications.aspx



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to