问题
Is there a way to embed a youtube video into a MediaElement and save the video? I know that once you have an object inside your application you can have some sort of control over it(I think). If I'm correct, is it possible to save the youtube video once it is embedded inside the MediaElement? Thanks.
回答1:
Youtube videos are not available as files, as they are streams. that makes it a bit hard to save them (Actually you can, JDownloader does that, but that's infringement of YT terms), but for playback, check this guide.
回答2:
You can use webcontrol for it. set the source property to use the embed link of the video. it will work fine.
Web Browser Source="https://www.youtube-nocookie.com/embed/W152nHe9rkM?rel=0&showinfo=0">
Web Browser>
来源:https://stackoverflow.com/questions/12184268/how-do-i-embed-a-youtube-video-into-a-wpf-mediaelement-and-save-the-video