C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,271 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello:
I have a number of MP4 files in my local hard drive. I want to play them automatically in WebView2.
How I can do this?
For example, I have one MP4 file: C:\Video2\1.mp4.
I can launch ME Edge, and press Ctrl-O to open this mp4 file and play it in Edge.
I want to do the same in a WinForm app. I can add one button (Button1), and if I click on Button1, then I want to launch WebView2 and begin to play the MP4 file. I can use both VS 2019 and VS 2022.
Please advise!
This simple test plays a .mp4 file :
webView2.Source = new Uri(@"E:\Gravity - 2K Trailer.mp4");