question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VideoState is Null on the "Play" event

See original GitHub issue

Describe the bug When attaching to the PlayCallback on an BlazoredVideo element, the VideoState is null

To Reproduce

<BlazoredVideo @ref="BlazoredVideo"
			   controls="controls"
			   Play="OnPlayerPlayed">
 <source src="https://res.cloudinary.com/blazoredgitter/video/upload/v1557015491/samples/elephants.mp4" type="video/mp4" />
</BlazoredVideo>
public void OnPlayerPlayed(VideoState obj)
{
	Console.WriteLine("State is " + (obj?.ToString() ?? "NULL"));
}

Is always null when i start of stop the video.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Hosting Model (is this issue happening with a certain hosting model?):

  • Blazor WebAssembly “Blazored.Video” Version=“1.0.0” “Microsoft.AspNetCore.Components.WebAssembly” Version=“3.2.1” “Microsoft.AspNetCore.Components.WebAssembly.Build” Version=“3.2.1”

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
mithuntacommented, Apr 10, 2021

@JPVenson Darn it. Thank you!

@SQL-MisterMagoo - I think there is an error in the example code in Readme.md. This is where I took the implementation. image

1reaction
JPVensoncommented, Apr 10, 2021

@mithunta You have a typo in your code: Its: VideoEventOptions not VideoStateOptions

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML5 video - Play event not firing
The video loads and plays correctly. However, the play event does not always fire. If the user: Clicks play; Watches the video to...
Read more >
onplay Event
Call a function when a video has started to play: <video onplay="myFunction()"> ... Description. The onplay event occurs when an audio/video is started....
Read more >
Null Reference Exception when playing video
When I try to play it via script, it brings up: "NullReferneceException: Object Reference not set to an instance of an object".
Read more >
Re: Why would FLVPlayback throw a null reference e...
I'm basing the completion event off of the VideoProgressEvent, when bytesDownloaded == bytesTotal. At that point I close the video player via the...
Read more >
Video
A library that provides an API to implement video playback and recording in apps. The Video component from expo-av displays a video inline...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found