Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
This repository was archived by the owner on May 6, 2024. It is now read-only.

Podcasts don't play the first time you press the play button in the Blazor web app #141

@danroth27

Description

@danroth27

The first time I try to play a podcast using the Blazor web app I get the following exception in the browser dev console:

       Unhandled Exception:
       Microsoft.JSInterop.JSException: The play() request was interrupted by a new load request.
       undefined
          at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
          at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
          at Podcast.Components.AudioInterop.PlayAsync(ElementReference element) in C:\Users\daroth\Documents\GitHub\microsoft\dotnet-podcasts\src\Web\Components\AudioInterop.cs:line 19
          at Podcast.Pages.Shared.Player.Audio.OnPlayingChanged(Boolean play) in C:\Users\daroth\Documents\GitHub\microsoft\dotnet-podcasts\src\Web\Pages\Shared\Player\Audio.razor:line 97
          at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
          at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
          at System.Threading.ThreadPoolWorkQueue.Dispatch()
          at System.Threading.ThreadPool.Callback()
       ThreadPool Callback threw an unhandled exception of type Microsoft.JSInterop.JSException

If I stop play and try to play again the podcast plays fine.

In general, to play a podcast I'm finding I have to click the play button once, pause it, and then play it again to hear sound.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions