I have an mp3 file and I want to play it through the earpiece rather than the phone's speakers. Since I want the playing to happen, even when in background, I have implemented a Windows Phone Audio Play back agent. Now how can I play the audio in earpiece only?
If you use the MediaElement provided to you in the Windows Phone Toolbox you wouldn't have to implement a play back agent or decide what speaker to play it through. If you plug in your earphones the phone will direct audio coming from the MediaElement to the audio jack. This is the native behavior of MediaElement and all mobile sound components.
Related
I have a problem while using MediaElement to play video. The video isn't shown in correct orientation if its VideoProperties.Orientation is different from VideoOrientation.Normal (e.g. VideoOrientation.Rotate90). Those videos can be recorded by native camera app while holding the phone vertically. It's strange that Windows Phone native video player also has the same problem and is always locked in landscape mode (this doesn't happen with IOS or Android video player). My question is : Does Windows Phone native video player use the same API to play video like MediaElement? In that case, is it possible that that API will be updated to fix this problem in future Windows Phone update? I need to confirm those things to make a suitable workaround for this problem.
Can Any one help me am new in windows phone.
Play any kind of videos in windows phone 8 like (youtub,brightcove,dvidshub)
You could simply use the Youtube class to play the youtube videos from Codeplex. Have a look into this
Reference:
How to Play youtube videos in windows phone 7?
http://sviluppomobile.blogspot.com/2013/07/embed-youtube-videos-into-your-windows.html
If you want to play a normal video from your local files you could use the MediaElement. This sample could be helpful.
Hope it helps!
you can have Reference form Nokia Developer Article given here (Video Playback with MediaElement in Windows Phone).
-This article demonstrates how to play a video using the MediaElement Windows Phone control and also how to play video from remote server in the default media player using MediaPlayerLauncher.
What's the proper way to display video in WinRT?
I'm receiving video over RTP and I need to display video to some component or surface.
I can decode and/or convert video to YUV or any RGB format myself, I simply want to know what component I should use for video display.
You can use MediaElement to play the video. Check out MSDN sample for playing media.
For Windows 8.1
For Windows 8
If you want full fledged media player then check out Player Framework: an open source component of the Microsoft Media Platform
Can anybody please tell me that how to play dynamic music list using background playback agent in windows phone 8,i search every where on internet but tutorials can use tha hard coded music list
You can write the information about the music list from the UI (main app) to a file in Isolated storage and then read that information into a List of AudioTrack from the Background Audio Playback Agent.
I stuck in a big problem I am playing audio in background using BackgroundAudioPlayer working fine while I am playing another audio file using MediaElement on foreground the background sound is stopped.I want to play both sound simultaneously background and foreground please let me how it will be done.
MediaElement and BackgroundAudioPlayer are exclusive - you can only use one of these at a time.
You are able to play additional sounds using the XNA SoundEffect APIs however. For example of these APIs see this blog entry.