Share via

why can not work when set CreateFromStream?

mc 7,186 Reputation points
2023-11-17T07:14:24.1466667+00:00
MediaCapture capture;
capture.StartRecordToStreamAsync(profile,stream);

and I use this stream to create MediaSource do not work.

myVideo=MediaSource.CreateFromStream(stream);

the video do not play.

unless I run this:

capture.StopCaptureAsync();

why?

how to play the video when I am capturing to the stream?

Windows development | Windows App SDK

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.