how do I embed a youtube video into a WPF MediaElement and save the video?

流过昼夜 提交于 2020-04-18 06:14:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!