Skip to content

[Bug] TimeUpdate Error: Failed to convert the JSON: {"name":"timeupdate"} #41

@pelva

Description

@pelva

Describe the bug
Net9 BlazoredVideo 1.0.1
The video plays normally , but the TimeUpdate parameter is empty, and many error messages are output in the console

To Reproduce
Steps to reproduce the behavior:

<BlazoredVideo Play="OnPlay"  TimeUpdate="TimeChange"
class="w-100"
style="max-width:800px;"
controls="controls">
    <source src="/api/video" type="video/mp4" />
</BlazoredVideo>
    private void OnPlay(VideoState state)
    {

    }
    private void TimeChange(VideoState state)
    {
        if (state == null)
            return;
        var t = state.CurrentTime;
        Console.WriteLine(t);
    }

Error Message:
BlazoredVideo: Error: Failed to convert the JSON: {"name":"timeupdate"}

System.NullReferenceException: Object reference not set to an instance of an object.
at Blazored.Video.BlazoredVideo.OnChange(ChangeEventArgs args)

Expected behavior
TimeChange(VideoState state) state should not be null

Screenshots
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingTriageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions