How to enable BACKGROUND MEDIA CAPABILITY in project Siena
Background media capability is a difficult task to
achieve by the users, especially nontechnical ones. This task can be achieved
by adding just 2 pieces of code. For better understanding, complete step by step tutorial is given
below, along with the images.
- Open Project Siena
- Add an audio element & add media to it
- Now Right Click and select ‘Publish’ from the toolbar. (File --> Publish)
- Click the publish button and create the package for the app.
- Now open the package and open the AppName Folder.
- Open AppxManifest.xml
- Add the following code under the <Application> tag
<Extensions>
<Extension Category="windows.backgroundTasks"
StartPage="default.html">
<BackgroundTasks>
<Task Type="audio"
/>
</BackgroundTasks>
</Extension>
</Extensions>
- Now open js folder & then open ‘init.js’ file.
- Find ‘<audio’ and add some additional code to it.
msAudioCategory=\"Communications\"
controls=\"controls\"
- Now install the app. & you are all done. :)
0 comments