Skip to content

Commit 43b81a9

Browse files
authored
[Blazor] Generalize the Image component and add new components for Video and FileDownload
Introduces a suite of media components for efficiently handling non-HTTP sources (byte[]s or streams) with streaming through JS interop and browser-side caching. The suite includes Image, Video, and FileDownload which built on a shared foundation.
1 parent 959c8e5 commit 43b81a9

22 files changed

+2371
-791
lines changed

src/Components/Web.JS/src/GlobalExports.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import { attachWebRendererInterop } from './Rendering/WebRendererInteropMethods'
1919
import { WebStartOptions } from './Platform/WebStartOptions';
2020
import { RuntimeAPI } from '@microsoft/dotnet-runtime';
2121
import { JSEventRegistry } from './Services/JSEventRegistry';
22-
import { BinaryImageComponent } from './Rendering/BinaryImageComponent';
22+
import { BinaryMedia } from './Rendering/BinaryMedia';
23+
2324

2425
// TODO: It's kind of hard to tell which .NET platform(s) some of these APIs are relevant to.
2526
// It's important to know this information when dealing with the possibility of mulitple .NET platforms being available.
@@ -51,7 +52,7 @@ export interface IBlazor {
5152
navigationManager: typeof navigationManagerInternalFunctions | any;
5253
domWrapper: typeof domFunctions;
5354
Virtualize: typeof Virtualize;
54-
BinaryImageComponent: typeof BinaryImageComponent;
55+
BinaryMedia: typeof BinaryMedia;
5556
PageTitle: typeof PageTitle;
5657
forceCloseConnection?: () => Promise<void>;
5758
InputFile?: typeof InputFile;
@@ -113,7 +114,7 @@ export const Blazor: IBlazor = {
113114
NavigationLock,
114115
getJSDataStreamChunk: getNextChunk,
115116
attachWebRendererInterop,
116-
BinaryImageComponent,
117+
BinaryMedia,
117118
},
118119
};
119120

0 commit comments

Comments
 (0)