Open Terrence77 opened 1 year ago
Could you please provide some more information about this?
I am running Windows 10 (21H2 OS build 19044.2846)
Project Sdk="Microsoft.NET.Sdk.Razor"> WinExe net7.0-windows "Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="7.0.81" WebView2 (1.0.1370.28)
I posted this in the original post, isn't this the runtime info you are looking for? If not, please tell me what else/how to get the info and I will gladly post it.
Thank you.
@Shangminx Do you have any information about this issue?
Hi @Terrence77, you can find the WebView2 Runtime version by checking the path of the WebView2 process in Task Manager (under Properties when you right click on the process).
I created a work item to track this internally, we'll let you know on this thread when there is an update.
@vickiez Is this information what you need? "Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="7.0.81"
WebView2 (1.0.1370.28)
If not, I would bet the issue is in any of the latest runtime versions?
Thank you for helping.
@Terrence77 1.0.1370.28 is the SDK version, it helps us to also know the WebView2 Runtime version when we try to repro
Is this it?
Yes, thank you for the info!
@vickiez When I run my app in a Blazor Server app, the Audio control works perfectly. I looked at the runtime while running the Blazor app and it is the same as I posted above.
The problem shows in a Blazor Maui App and a WinForms app using the WebView2 control.
Got it, thanks. FWIW, I wasn't able to repro with a regular WebView2 WinForms app with that SDK and Runtime. If the issue is in Maui you may want to also open an issue here: https://github.com/dotnet/maui/issues
@vickiez
So are you saying when you are playing an audio stream, and you move the timeline forward it sticks to the timeline? When I do it, the audio reverts back to the beginning.
Can I upload a zip file of my simple project to demo the issue?
Or can you post your simple project example of it workin?
Are you clear on the issue that I am having?
Thank you for working with me on this.
Yes, setting audio.currentTime is working fine for me with our WinForms sample app. I am just adding an audio element and advancing the time. A repro project would be great, thanks! Feel free to modify our Winforms app as well.
@vickiez Attached is my sample code, Everything is in the Counter.razor page and the Components/TpsAudioPlayer.razor files. I deleted the sample mp3 file in the wwwroot/audio folder so adjust the path in the Counter.razor file.
Thank you.
@vickiez The sample app you posted is not using the same control I am...I don't think. This sample app is using:
<TargetFrameworks>net462</TargetFrameworks>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1777-prerelease" />
I am using
<TargetFramework>net7.0-windows</TargetFramework>
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="7.0.81" />
So the Audio element might have worked in that old project, but it does not work in the newer versions.
@vickiez, @Shangminx any update on running my code?
Our Winforms app is actually using the newer version of the WebView2 SDK, 1.0.1777-prerelease. The BlazorWebView component in your app appears to be using the 1.0.1370.28 WebView2 SDK.
I changed our Winforms app to use the same SDK but couldn't repro, so the issue may be in BlazorWebView. It's maintained in the repo I linked above
Ok, over in the Maui area? Thanks.
I am facing same issue in samsung tizen tv apps, sometimes current time is not working, maybe because mp3 is long? did any one find the reason for this?
@sarah-harissa Check out this topic over in Maui Blazor https://github.com/dotnet/maui/issues/14964
Description WinForms with Microsoft.AspNetCore.Components.WebView.WindowsForms.BlazorWebView
When adding an html
The same bug exists in a Maui Blazor App The bug does not exist in a regular Blazor Server App.
The Pause, Volume and Playback Speed work just fine.
Project Sdk="Microsoft.NET.Sdk.Razor"> PropertyGroup> OutputType>WinExe TargetFramework>net7.0-windows UseWindowsForms>true ImplicitUsings>enable /PropertyGroup> ItemGroup> PackageReference Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="7.0.81" /> /ItemGroup> /Project>
AB#44489621