+ Note (cross-origin isolation): this demo site is served cross-origin isolated with
+ Cross-Origin-Embedder-Policy: require-corp to enable the multi-threaded WebAssembly
+ runtime, and under that header a cross-origin script must carry a
+ Cross-Origin-Resource-Policy header or be loaded in CORS mode. The CesiumJS build on
+ cesium.com sends neither, so the browser blocks it outright. This example therefore loads
+ CesiumJS from this site's own origin instead, via the provider's BaseUrl parameter - point
+ it at a copy of the Build/Cesium folder you host or proxy yourself. Note that CesiumJS
+ resolves its workers, .wasm decoders and assets relative to that URL, so the whole folder
+ has to be reachable under it. Your own app needs none of this unless it is cross-origin isolated too.
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/Map/BitMapDemo.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/Map/BitMapDemo.razor.cs
index e86ba897b55..90543df3c59 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/Map/BitMapDemo.razor.cs
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/Map/BitMapDemo.razor.cs
@@ -1,4 +1,4 @@
-namespace Bit.BlazorUI.Demo.Client.Core.Pages.Components.Extras.Map;
+namespace Bit.BlazorUI.Demo.Client.Core.Pages.Components.Extras.Map;
public partial class BitMapDemo
{
@@ -261,7 +261,21 @@ public partial class BitMapDemo
private readonly BitMapLibreMapProvider maplibreProvider = new() { Center = new(48.8566, 2.3522), Zoom = 5 };
private readonly BitOpenLayersMapProvider olProvider = new() { Center = new(35.6762, 139.6503), Zoom = 4 };
private readonly BitArcGisMapProvider arcGisProvider = new() { Center = new(40, 0), Zoom = 2, BasemapId = "osm" };
- private readonly BitCesiumMapProvider cesiumProvider = new() { Center = new(20, 0), Zoom = 2, SceneMode = "scene3d" };
+ // On the web the BaseUrl points at this site's own CesiumJS passthrough (CesiumController)
+ // rather than the cesium.com CDN: the demo is served with Cross-Origin-Embedder-Policy:
+ // require-corp, and cesium.com sends neither Cross-Origin-Resource-Policy nor
+ // Access-Control-Allow-Origin, so the browser blocks its script in both no-cors and CORS mode.
+ // Serving it same-origin sidesteps the check. Your own app only needs this if it is
+ // cross-origin isolated too - which is why the MAUI/Windows hybrid clients keep the default:
+ // their origin (app://0.0.0.0) hosts no such endpoint, and a hybrid WebView is not
+ // cross-origin isolated, so the CDN URL both works and is the only one that resolves there.
+ private readonly BitCesiumMapProvider cesiumProvider = new()
+ {
+ Center = new(20, 0),
+ Zoom = 2,
+ SceneMode = "scene3d",
+ BaseUrl = AppRenderMode.IsBlazorHybrid ? BitCesiumMapProvider.DefaultBaseUrl : "/api/cesium",
+ };
// ── Example 2 – Markers ───────────────────────────────────────────────────
@@ -1127,5 +1141,10 @@ private Task OnAdvancedDoubleClick(BitMapLatLng p)
";
private readonly string example13CsharpCode = @"
// Bind a stable field so the provider isn't reallocated on every render.
-private readonly BitCesiumMapProvider cesiumProvider = new() { Center = new(20, 0), Zoom = 2, SceneMode = ""scene3d"" };";
+private readonly BitCesiumMapProvider cesiumProvider = new() { Center = new(20, 0), Zoom = 2, SceneMode = ""scene3d"" };
+
+// Only needed when your page is cross-origin isolated (COEP: require-corp): cesium.com sends
+// neither a Cross-Origin-Resource-Policy nor an Access-Control-Allow-Origin header, so the
+// script is blocked. Point BaseUrl at a copy of the Build/Cesium folder on your own origin.
+// private readonly BitCesiumMapProvider cesiumProvider = new() { ..., BaseUrl = ""/api/cesium"" };";
}
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/RichTextEditor/BitRichTextEditorDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/RichTextEditor/BitRichTextEditorDemo.razor
index 0b62771b81a..d0b0b6930bf 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/RichTextEditor/BitRichTextEditorDemo.razor
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Extras/RichTextEditor/BitRichTextEditorDemo.razor
@@ -216,6 +216,17 @@
The Media group embeds a direct audio/video URL as a native video/audio element. The Rule
group inserts a horizontal divider. Note: iframe embeds (e.g. YouTube/Vimeo) are not kept by the default
sanitization policy, so supply a custom policy that allows the iframe tag if you need such embeds.
+
+ Note: this demo site is served cross-origin isolated with
+ Cross-Origin-Embedder-Policy: require-corp to enable the multi-threaded WebAssembly
+ runtime. Under COEP a cross-origin iframe (YouTube/Vimeo) is blocked unless the embedded page opts
+ in. A direct audio/video URL is fetched in no-cors mode unless the media element itself carries
+ crossorigin="anonymous" (an attribute the default sanitization policy drops, so it takes
+ a custom policy to keep). So a cross-origin media URL is blocked unless its server sends a
+ Cross-Origin-Resource-Policy header for the no-cors request, or an
+ Access-Control-Allow-Origin header when the element opts into anonymous CORS mode. Media
+ from your own origin, or from hosts that send those headers, is unaffected; so is any app that does not
+ send COEP.
+ ImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-unselected.png"
+ SelectedImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-selected.png" />
+ ImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-unselected.png"
+ SelectedImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-selected.png" />
+ ImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-unselected.png"
+ SelectedImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-selected.png" />
+ ImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-unselected.png"
+ SelectedImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-selected.png" />
+ ImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-unselected.png"
+ SelectedImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-selected.png" />
+ ImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-unselected.png"
+ SelectedImageSrc="/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-selected.png" />
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/ChoiceGroup/_BitChoiceGroupOptionDemo.razor.samples.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/ChoiceGroup/_BitChoiceGroupOptionDemo.razor.samples.cs
index 47e8fa48689..a5a93b8eb0e 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/ChoiceGroup/_BitChoiceGroupOptionDemo.razor.samples.cs
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/ChoiceGroup/_BitChoiceGroupOptionDemo.razor.samples.cs
@@ -45,14 +45,14 @@ public partial class _BitChoiceGroupOptionDemo
Value=""@(""Bar"")""
ImageAlt=""Alt for Bar image""
ImageSize=""@(new BitImageSize(32, 32))""
- ImageSrc=""https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/choicegroup-bar-unselected.png""
- SelectedImageSrc=""https://static2.sharepointonline.com/files/fabric/office-ui-fabric-react-assets/choicegroup-bar-selected.png"" />
+ ImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-unselected.png""
+ SelectedImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-selected.png"" />
+ ImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-unselected.png""
+ SelectedImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-selected.png"" />
+ ImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-unselected.png""
+ SelectedImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-selected.png"" />
+ ImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-unselected.png""
+ SelectedImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-selected.png"" />
+ ImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-unselected.png""
+ SelectedImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-bar-selected.png"" />
+ ImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-unselected.png""
+ SelectedImageSrc=""/_content/Bit.BlazorUI.Demo.Client.Core/images/choicegroup/choicegroup-pie-selected.png"" />
"" TValue=""string"" DefaultValue=""@(""Day"")"" Horizontal>
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/CircularTimePicker/BitCircularTimePickerDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/CircularTimePicker/BitCircularTimePickerDemo.razor
index 45972d2b5c0..ee7fb3bf185 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/CircularTimePicker/BitCircularTimePickerDemo.razor
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/CircularTimePicker/BitCircularTimePickerDemo.razor
@@ -337,7 +337,7 @@
-
+