File format supported by windows media player component - axwindowsmediaplayer

I m developing media player in c# and I m using windows media player component for that..
This is my code
private void songList_SelectedIndexChanged(object sender, EventArgs e)
{
axWindowsMediaPlayer1.URL = paths[songList.SelectedIndex];
}
Can anyone tell me the supported file formats for this component?
The version information property of the component is '12.0.7600.16385'

See this microsoft website for the supported file formates. All the file formats are listed and the compatible windows media player versions.

Related

Xamarin UWP MediaPlayer streaming audio from URL starts in middle of file, or doesn't start at all

I'm writing a music player app to stream music from Onedrive in Xamarin Forms, which compiles to both Android and UWP. To play a audio file, I pass the URL of the audio file to the native function "Play" which is called via an interface in both the Android and UWP code, which streams the audio file. The Android implementation works perfectly, so I know there is nothing wrong the the audio files or URLs. But for the UWP implementation, larger files sometimes start in the middle of the file, or in one case don't play at all. Again, these all work in Android. Some files work fine though. I'm using MP3 and Flac files, I think I've only had problems with Flac, I assume because they are larger. No errors seem to be thrown as far as I can tell.
The goal here is a to start the audio stream as fast as possible from the URL.
I've tried the most common implementation to stream audio to UWP MediaPlayer that I've found, which is in the code below, as well as using a BackgroundDownloader as a source for MediaPlayer. I've also tried downloading the file beforehand, which takes forever and I'd like to avoid.
[assembly: Dependency(typeof(CloudPlayer.UWP.PlayMusic_UWP))]
namespace CloudPlayer.UWP
{
public class PlayMusic_UWP : PlayMusic
{
MediaPlayer mediaPlayer { get; set; }
public PlayMusic_UWP()
{
mediaPlayer = new MediaPlayer();
}
public void Play(string filePath)
{
mediaPlayer.Source = MediaSource.CreateFromUri(new Uri(filePath));
mediaPlayer.Play();
}
}
}

Image Control is not rendering in WinRT 8.1 Xamarin.Forms (Portable) project

Image Renderer in xamarin.forms not rendering in Xamarin.Forms (Portable) and it is working in Xamarin.Forms (Shared) for windows RT 8.1 phone. Why is that so? Is there another way of rendering IMAGE control in windows RT 8.1 phone.
My code :
-assembly code here
[assembly: ExportRenderer(typeof(Xamarin.Forms.Image), typeof(ImageWinRenderer))]
-renderer class below
public class ImageWinRenderer : Xamarin.Forms.Platform.WinRT.ImageRenderer
override onelement changed method
protected override void OnElementChanged(ElementChangedEventArgs e)
I tried working with Image render in shared project (xamarin), it worked!!. Still, not able to find conclusive answer for why it is not working in portable project

Text to speech in windows phone 7

I want to use text to speech conversion in my WP7 application.
After searching on internet and different forums i found that there are some bing api available for doing this task..
this API allows only 5000 requests per month for free. link for getting app Id
If i want to use an API for commercial use.. it can not be done with this API..
Is there any other API available for this or any free Google API..
Please give some directions and suggestions
I think the best solution for your problem is to target your app for windows phone 8 OS. trust me i tried many solutions to make my windows phone 7 app app use TTS . the quality that will get is not good . In windows phone 8 the TTS is very easy and the quality is amazing .
SpeechSynthesizer synth = new SpeechSynthesizer();
private async void AgainBtn_Click(object sender, System.Windows.RoutedEventArgs e)
{
await synth.SpeakTextAsync("anything");
}
If you still want to target windows phone 7 use Hawaii Research project

how to use pls format into windows phone?

How do I use PLS format on windows phone ? Here's my attempt so far:
private static List<AudioTrack> _playList = new List<AudioTrack>
{
new AudioTrack
(
new Uri("http://mobilehigh.bmradio.de:8080/titel-info", UriKind.Absolute),
"Windows Phone Radio",
"Windows Phone Radio Podcast",
new Uri("shared/media/Episode29.jpg", UriKind.Relative)
),
};
Windows phone doesn't support the pls format. For Supported playlists see Supported Media Formats, Protocols, and Log Fields
Hence if you need to support the pls format you'll have to write support for it by your yourself.

Camera capture in Windows Phone 7 through an XNA application

I know that Microsoft hasn't officially supported doing any video capture applications as of yet. I've found the Clarity Consulting blog entry that highlights how to use the camera through Silverlight (entry is here: http://blogs.claritycon.com/kevinmarshall/2010/12/23/wp7-camera-access-flashlight-augmented-reality-and-barcode-scanning/). But, as of yet, I have been unsuccessful in porting the code to be used by an XNA framework.
Has anyone had any luck either using the Windows Phone 7 camera in an XNA application? If so, care to share your wisdom?
Thanks!
Generally you can access the camera the same way you do it in Silverlight - there is the CameraCaptureTask - you need to add a reference to Microsoft.Phone first and then call it from the game.
Microsoft.Phone.Tasks.CameraCaptureTask task = new Microsoft.Phone.Tasks.CameraCaptureTask();
task.Completed += new EventHandler<Microsoft.Phone.Tasks.PhotoResult>(task_Completed);
task.Show();
That would be for static capture, and your event handler is like this:
void task_Completed(object sender, Microsoft.Phone.Tasks.PhotoResult e)
{
// Do something with e.ChosenPhoto
}
Currently, video recording is done through the undocumented way - this will most likely get your app submission disapproved from the Marketplace, but it is possible nonetheless.
What's done that way is a MP4 file is constantly updated in the IsolatedStorage as the recording is in progress. But then again, there are methods present to include the file in the media library.
Think you are a bit unclear about the whole microsoft and supporting cameras.
Microsoft released not too long ago Expression Encoder 4 which allows you not only to video screen capture your screen but as well access all devices connected to your pc.
I would believe this would be much more ideal then being restrained to only using a windows 7 phone especially for an xna game.
Hope this sheds some light.
Nowadays you can use FileSink to save video from a CaptureSource like VideoCaptureDevice into a file.
http://msdn.microsoft.com/en-us/library/system.windows.media.filesink%28v=vs.96%29.aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.capturesource%28v=vs.96%29.aspx
http://msdn.microsoft.com/en-us/library/system.windows.media.videocapturedevice%28v=vs.96%29.aspx

Resources