Open Mike-FB opened 9 months ago
I am having the save issue.... I am trying to get the VideoState OnTimeUpdate (as discribed in the readme) and it's always null... I am using
.Net 8 Blazor Server (InteractiveServer) is having the issue Blazor Standalone is having the issue too
any solutions?
Thanks
Describe the bug When an event occurs while no
VideoStateOptions
is set up for the currentBlazoredVideo
component, aSystem.NullReferenceException
is thrown, caught, and logged inBlazoredVideo.OnChange
on line 202. This seems to be becausevideoData.State
is null after being deserialized. I would imagine the fix is to either always initialize the property in theVideoEventData
constructor, or not attempt to set thevideoData.State.Video
property whenvideoData.State
is null.To Reproduce Steps to reproduce the behavior:
OnInitialized
tovar allOptionsEnabled = new VideoStateOptions() { All = false };
, settingAll
fromtrue
tofalse
.System.NullReferenceException
.Expected behavior I would expect it would not attempt to set a property on a null object or that the resulting
NullReferenceException
is not logged.Screenshots
Hosting Model (is this issue happening with a certain hosting model?):