I've added sound effects to some events in my Windows Phone app using MediaElement. When these sounds play, the background music playing from other apps, like Zune, gets paused. Is it possible to overcome this?
I read somewhere that it can be achieved using XNA; but since I'm developing on my Windows 8 machine, I can't use XNA.
Even when developing on Windows 8 you can use XNA libraries in your Windows Phone apps. You should probably use SoundEffect and SoundEffectInstance for playing sound, the only problem is you need to have the sounds in wav form as a part of your project, not mp3 or files stored in MediaLibrary, as far as I know.
Difference between SoundEffect and SoundEffectInstance classes
Related
I was asked to develop a software in vb.net and one of it's features should be the possibility to take photos on a tablet PC. I already played around with the MediaCapture API which returns me a photo, but as it seems that it's not possible to show a preview or anything else outside of ModernUI apps. It's just pure photo capturing.
I thought for a little while how this problem could be solved. I got some inspiration from my Android phone then. My idea was to call some sort of API to open up the regular Windows 8 camera app in ModernUI mode, let the user take the photo and then receiving that through a "return value", just like you usually do it in Android apps.
Now my question is, if there is a way to start up the Windows 8 default camera app, let it take a photo and receive that back into my WPF desktop application.
I could develop my software as ModernUI app as well, but I never did that and it also seems like you must publish it over the web store then, but I only want to use that inside my company.
My other (simple stupid) idea would be to ask the user to open the camera app by himself, take some photos and come back to my software later. I could then receive the images from the folder they were stored in. I guess that would work as well, but I don't really like that idea because it's not very intuitive and seems just stupid.
If you have an idea (or an alternative), I would be really happy if you could share it with me.
Thanks in advance!
Unfortunately, there are no .NET classes that allow you to access a webcam or integrated camera on your computer. This means that you have to take a look at the native Windows API and call it from your application. I cannot point you to the right methods that you have to use, as I just have used Microsoft Media Foundation to capture a continuous stream of images from a webcam and encode it to a video file.
There are some sites that encapsulate this native functionality in .NET classes, but I don't know if they are good or not:
http://dotnet.dzone.com/articles/using-webcam-wpf-application
http://www.yiigo.com/guides/vbnet/how-to-process-image.shtml
(just google for more if you'd like to).
In Windows Store Apps, this task can be performed relatively easy with the media capture API you've mentioned. You can also side-load Windows Store Apps if you have Windows 8 Pro or Enterprise - then you do not have to publish your app in the Windows Store.
If you have any further questions, please feel free to ask.
I'm interested in making a desktop application which I would want to use as a Desktop Manager. This kind-of goes to Desktop Enhancement Category. My requirements are:
Application has to be visually rich, with panels sliding,fading,wiping,rotating and etc.
It should also support flash playback. (swf, flv)
Animations/Transitions should run smoothly.
Lower CPU Usage.
My question is which is a better option to build this application. Microsoft's "WPF" or Adobe Flex(running in Adobe Air to run on desktop). And also respond as why it is better.
Be suspicious of anyone who will give you an answer like "Definately use xyz" to this question. There are pros and cons to both sides.
First, I think you might be confusing what WPF and Air are... WPF is a presentation layer on top of the .Net framework, where Air is a framework by itself. Apples and Oranges. If you want an analog to what Air is for the .Net stack, you probably want to look at Silverlight Out-Of-Browser, which is a much closer comparison to Air.
What is the difference, then, between WPF and Sliverlight OOB? Again, WPF sits on top of a very large .Net framework where Sliverlight OOB is a very light framework (in comparison) like air. It is the difference between a 200 MB download/install and a 12 MB download/install.
So, that being said, I think you should also ask what platforms this needs to run on. Silverlight OOB runs on Mac and Windows where WPF only runs on Windows. Air runs on Mac, Windows and Linux.
The next thing that I see is that you need to do SWF and FLV playback. This will be easier to achieve with Air, since it is native. You CAN do this with Silverlight OOB but you will find yourself rigging something up where you host an HTML control and run the flash movie inside the HTML control. It is a bit more clunky, but it will work.
Other than that, Air and SLOOB are very similar in features. It then comes down to your team and the expertise, IMO. If they are already familiar with the WPF/Silverlight, then a SLOOB app is well suited with minimal ramp-up. If your designers are more familiar with the Adobe suite of tools, then it might be easier to build a shiny app using Air.
In all, the decision between Air and Silverlight/WPF really comes down to preference. That is, once you get past any particular techincal limitations like the flash playback or OS support.
Hope this helps,
Brian
I currently have a SmoothStreaming video comming from a Wowza server and We are currently using the SMF to play the video on the Windows Phone 7 and on the computer. We are adding the Manifest to the playlist and setting it to
PlaylistItem { DeliveryMethod = DeliveryMethods.AdaptiveStreaming };
The problem we are currently facing, is that even if the player is set on AutoPlay="True", the video will not start on it's own. We must open the play list in the player and select the first video for it to start playing.
we have also tried to the CurrentPlaylistItem, but this has not changed anything.
has anyone dealt with smoothstreaming from a Wowza Server? Can someone shed some light on this strange behavior?
When trying to play a video on the Windows Phone 7 using the SMF (Silverlight Media Framework) it is important to know that a H.264/MPEG-4 video will not play in the emulator, and will not play if the device is connected to the computer. The video will play only if the device is connected via WIFI or 3G.
Further more, be sure to have the latest version of the SMF. It was reported that binding the CurrentPlaylistItem does not work on certain versions. A quick solution to this problem, is to make the binding in code and not in xaml.
I've developed a WP7 app that uses the MediaElement to progressively download and play mp3 files from external URIs. I've been testing this on the emulator regularly and it works like a charm... But after getting my actual WP7 today, loading the external MP3 gives me a "AG_E_NETWORK_ERROR"
After searching around, I've read that Silverlight doesn't allow cross domain calls? I don't exactly buy that answer since I tested it on a silverlight app and it's been working trouble free on my windows phone 7 emulator.
Can anybody confirm that external mp3's can be played in mediaelemnt on the actual phone?
That's the kind of error you can get when the Zune sofware is running.
You should try to deploy your app, close Zune then launch the app directly on the phone.
Silverlight on Windows Phone 7 does not have any cross domain restrictions.
If you are testing this with the phone connected to your PC, try using WPConnect, rather than the Zune software.
I'm starting a hobby project in which I would like to have a graphical, touchscreen interface for interacting with a kiosk-like device running on top of Windows XP Embedded. For development of a rich UI experience, I was considering using WPF. However, a number of demonstration videos that I have come across have used Silverlight, while I haven't seen a single WPF demonstration.
It was my understanding that Silverlight was targeted towards website developers, while WPF was more targeted towards desktop development.
So this question has two parts. Firstly, what is the recommended graphical subsystem for development of a rich UI experience on a kiosk-like device hosted on the Windows XP embedded platform? Secondly, if it is Silverlight, which version is suggested (1.0 or 2.0) and why?
It seems that WPF works fine on embedded. See here the second comment.
I think that your choice should be dependent on the type of kyosk you want to build. Some kyosks are just an open browser page. And then you have stuff like Microsoft Surface that can be used like an horizontal kyosk :-)
I would recommend also WPF, have done few kiosk apps using it.
also I would recommend http://fpscomponents.com/Product.aspx?id=8 as a virtual touch screen keyboard software component. it's done in WPF and very flexible and customizable.
User can define custom theme(skin), layout and language of keyboard. guys are working with customers and hear theirs voice so any suggestions might be accepted.