Playing multiple audio files simultaneously in WP8 - audio

I want to play two audio files simultaneously in WP8 from within the same app:
The first one will be launched by "BackgroundAudioPlayer.Instance.Play();".
The second one will be launched by an HTML5 "audio" element within a Html file of the app.
The scenario would be something like this:
When the user launches the app, the background music starts playing.
When the user goes to a particular Html page of the app, its associated music starts playing.
When the user switches the app or locks the screen, the music of that Html page stops, however, the background music keeps on playing until the app is closed.
When the user comes back to that Html page again, its associated music starts playing along with the background music.
Appreciate your suggestions on this.
Thanks.

Together, we have tested a very simple App trying to play simultanously two audio files. The App worked like this:
Play button has started audio file via BAP
then we have navigated in WebBrowser to a page (located in IsolatedStorage) where there was an audio element
and we have pushed play button in WebBrowser (still BAP playing in the background)
It turned out that WebBrowser uses BAP as a player, so after we have pressed the button, our poor BAP playing in the background was terminated and replaced with new fresh one from WebBrowser.
It means that our magnificent idea and superb plan had withered on the vine.

So crap....
You'd need to build a player in your app so it could run simultaneously to the native one.
This explains why you cant run a gif and play music simultaneously.

Related

Is it possible to embed/stream/project the live image of a native Windows window into a webpage?

In the new Microsoft Flight Simulator you can pop different cockpit displays out into their own external windows, like this:
However, none of the buttons needed to interact with the displays get "popped out" as well.
I'd like to build a web app that can embed (the continuously updating image of) one of these windows that I can surround with buttons, etc, for interaction to have, say, running on a tablet next to you.
My question is, is it possible with Node to embed the continuously updating image of a native Windows window within a webpage?
Stumbled upon the Screen Capture API. This is what I was looking for.
https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API

Playing audio using Gtk's broadway

I have several Gtk3 apps that I sometimes display in a browser using Broaday.
When running an app on the desktop (Linux in my case), it plays sound by running Sox's "play" command. This obviously won't work for Broadway.
Is there any way to pass audio data to broadwayd (or tell it to play a file) so it the browser will play the sound?
My code is Perl, but I'm open to suggestions in any language.

Background Audio stops once WP8 App has been minimized and then resumed

In my WP8 app, there is a background audio that plays throughout my App.
When I minimize the App, the audio obviously goes off as it is supposed to do. However, when I resume the app, the audio does not continue, that is totally stops!
Another interesting thing to be noted in my App is that after resuming, only the background music is affected whereas other audio that need to be played for a short duration, say for example on a button click, function normally as expected.
I think it's got something to do with the App's life cycle and Fast App Resume feature.
Kindly help me out. Thanks.
If you're not working on with the BackgroundAudioPlayer, then you should check this in order to play Background Audio within your application.
Reference: Background Audio Streamer Sample

How can I use a UIWebview to load content from a asp.net website dynamically loading .mp4 video and get the video to play?

I have a client that has a website. The website current allows users to login and search for and play .mp4 video. The list of playlist is created dynamically where values are stored in a sql server 2008 database. My client's site is already built for smartphone utilization and did not want to recreate an iphone app. Besides it would mean loading thousands of video. Instead I thought I would use the UIWebview to load the website. This seemed to work well. However, when you try to click on and play video within the UIWebview nothing happens. This is not the case if we launch the mobile website within the apple mobile safari browser. The vide plays by kicking off in the iPhone video player. Is there any way to accomplish this same functionality with a uiwebview? Any guidance or help is appreciated.
UIWebView will play video using <video> if everything is set up correctly, either remote files or local files will work (if they are the correct format).
What does your video tag look like? In particular your src.
If you want to, for example, play an inline video the html5 for that would be something like
<video id="theVideo" controls width="280" height="160" src="yourVideo.mp4" webkit-playsinline></video>
And it would be necessary in the UIWebView to set this line
self.webView.allowsInlineMediaPlayback = YES;
Or you can also explicitly load the media player, but doing everything in HTML5 is neat and tidy and easy.

AudioQueueStart() method can not play music in ios4 background

In the iphone 3.x platform, I use AudioQueueStart method to play music, but on ios4 platform, once the program into the background,then no sound, but I notice that the app is still running in background, I've added into the info.list UIBackgroundModes/Audio and applicationDidEnterBackground methods
One thing to check is that the AudioSession is active first.
In my case, I had previously set the session to inactive between song changes before starting a new song:
AudioSessionSetActive(false);
Once I removed this AudioQueueStart works just fine from the background.

Resources