public MediaRecorderBlobFileStream(string fileName, MediaRecorderOptions mediaRecorderOptions,
                                           IJSRuntime jsRuntime)
        {
            _fileName             = fileName;
            _mediaRecorderOptions = mediaRecorderOptions;
            _jsRuntime            = jsRuntime;

            _streamSaverJsObjectRef     = jsRuntime.GetJsPropertyObjectRef("window", "streamSaver");
            _writeableStreamJsObjectRef = jsRuntime.CallJsMethod <JsObjectRef>(
                _streamSaverJsObjectRef, "createWriteStream", fileName);
            _writerJsObjectRef = jsRuntime.CallJsMethod <JsObjectRef>(_writeableStreamJsObjectRef, "getWriter");

            Initialization = InitAsync();
        }
Beispiel #2
0
 public static IMediaDevices Create(IJSRuntime jsRuntime) =>
 new MediaDevices(jsRuntime, jsRuntime.GetJsPropertyObjectRef("window", "navigator.mediaDevices"));
Beispiel #3
0
 public static IWindow Create(IJSRuntime jsRuntime) =>
 new Window(jsRuntime, jsRuntime.GetJsPropertyObjectRef("window", null));
Beispiel #4
0
 public static INavigator Create(IJSRuntime jsRuntime) =>
 new Navigator(jsRuntime, jsRuntime.GetJsPropertyObjectRef("window", "navigator"));