Video Player to play video - c#

I want to play youtube video in windows 8 application with XAML and c#.
I don't want to play youtube video from WebView control of windows 8 i want to play video from my own control is that possible ? can anyone help me for this please ?

Try MyToolkit on CodePlex. You can use GetVideoUriAsync to get a URI to feed to a MediaElement.
var url = await YouTube.GetVideoUriAsync(youTubeId, YouTubeQuality.Quality1080P);
var player = new MediaElement();
player.Source = url.Uri;

Yes this is possible you can take a look on these three links:
YouTube API
Manage YouTube Over Code
Example how to Play Videos with YouTube API

First thing its YouTube TOS violation.
But if you really want to do that, first you need to extract the streaming URL from the response from YouTube when you do a request.Check this code and port it to c#
youtube-dl

Related

C# playback of Vimeo videos

I'm looking for a way to stream Vimeo videos using my C# application. At the moment I am playing back videos locally using a Windows Media Player widget in a Windows Forms application.
I suppose I could use a WebBrowser in Form window if I had to, but am looking for something a bit more native than that if possible.
I found that the Windows Media Player control was able to play back Vimeo links directly.
A Vimeo Pro account is required in order to get the links to videos that can be used to stream videos using "3rd party players".

Play mutiple videos from my application with audio on different devices

My application currently uses the AXWindowsMediaPlayer component to play videos and in turn sound is played using the default sound device.
I need to add support for playing multiple videos and in turn I need to be able to setup audio sources for each of the videos.
Thoughts on how to achieve this:
Set the audio endpoint of the AXWindowsMediaPlayer to my specified device (I Know I can do this in windows media player program but don't know how in code).
Play the video using WMP and stream the audio using NAudio.
Can anyone provide some recommendations on how best to achieve what I need and perhaps a link to some documentation I need to be looking at? I can't seem to find anything on this.
I ended up using NAUDIO for this.
This is the code I used:
var waveReader = new MediaFoundationReader(playListItem.FilePath);
_waveOut = new WaveOut {DeviceNumber = playListItem.PlayerScreen.AudioDevice.Id};
_waveOut.Init(waveReader);
wmPlayer.settings.volume = 0;
wmPlayer.URL = playListItem.FilePath;
_waveOut.Play();

Stream video from WP 8.1 to TV via DLNA

I am working on the Windows Phone 8.1 app, in which I want to implement online video streaming and play video from windows phone device to TV through DLNA via wifi connectivity.
similar functionality to LUMIA PlayTo app, but want to stream online video over TV through DLNA.
can any one help with this because has googled a lot, but haven't found anything relevant
Any help is appreciated.
Thank you.
That is a fairly broad question. There is a MediaElement control you can use to play video. Maybe the open source PlayerFramework is more helpful. It provides a way to play lots of content, including progressive downloads, streaming, live streaming, protected content, advertisements, etceteras. And you can style the player as you see fit.
Have a look at http://playerframework.codeplex.com for the downloads, sources and documentation.
An easy start can be found here: Getting Started Guide.
Attribution for answer
Source
Author
Use and study this
Sample code

Set webbrowser audio to stream to media player so it can be used in background on windows phone 8

I am making a netradio app on windows phone, my problem is that netradio uses the RTSP audio format and native media player in Windows Phone does not support RTSP.
As a workaround, I have to navigate to a webpage that then handles the audio.
This works fine, and plays the radio, but the problem is that as soon as the app is put in the background the music stops.
Is there a way to keep the webbrowser audio playing?
You could use the BackgroundAudioPlayer within your solution as another project where you could go through a sample here.
And also the sample from Codeplex you can try the Windows Phone Streaming Media.
https://phonesm.codeplex.com/
Hope it helps!
There is no native RTSP support with BackgroundAudioPlayer. You would need to make your own MediaStreamSource implementation to be able to use the stream. At least I didn't find any public 3rd party solutions. Check this http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e052ea29-53cf-4ebb-8558-742b67fc72ad/rtsp-support-in-wp8.
If you are up for the task of writing your own MediaStreamSource implementation, you can use this as starting point and study the RTSP protocol here.

How Play YouTube video in webBrowser control?

Is there a way to play YouTube video in webBrowser control? Because when i tap on watch video nothing happens...
Thanks!
As far as I know Windows Phone 7 does not support Flash yet.
Take a look at this:
http://answers.microsoft.com/en-us/winphone/forum/wp7-wpdevices/will-windows-phone-7-play-you-tube-and-flash/29c69dc1-658f-4729-b24d-67b46a4138d2

Categories