why can not work when set CreateFromStream?

mc 4,436 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 App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
780 questions
{count} votes

Your answer

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