From 795b3b74e122852c85a11753ef65df4af4922d50 Mon Sep 17 00:00:00 2001 From: Andre Lafleur Date: Sat, 16 May 2026 12:23:09 +0800 Subject: [PATCH] chore: add Genetec Web Player samples --- README.md | 33 ++++++++++++++++++++++----- Samples/Genetec.Dap.CodeSamples.sln | 35 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index be542a5b..b7860119 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Visit [Genetec's DAP](https://www.genetec.com/partners/sdk-dap) and join the pro - **.NET Framework 4.8.1**: The sample projects can be built using .NET Framework 4.8.1, which is supported by all versions of Security Center. -- **.NET 8**: Some sample projects can be built using .NET 8, but only with **Security Center SDK 5.12.2 or later**. Currently, only the **Platform SDK** (Genetec.Sdk.dll) supports .NET 8. +- **.NET 8**: Some sample projects can be built using .NET 8. Platform SDK samples require **Security Center SDK 5.12.2 or later**; Plugin SDK .NET 8 support applies to server modules in **Security Center 5.13 or later**; Genetec Web Player samples target .NET 8 and do not use the .NET Security Center SDK. @@ -64,7 +64,7 @@ After setting up your environment, you can explore the sample projects in this r ## Security Center SDKs -The sample projects in this repository are organized into four main SDKs, each building upon the foundational Platform SDK: +The sample projects in this repository are organized into four Security Center SDKs (each building upon the foundational Platform SDK) and a separate collection of Genetec Web Player samples: @@ -178,6 +178,26 @@ Server-side plugin development samples that **build upon Platform SDK infrastruc See the [Plugin SDK README](Samples/Plugin%20SDK/README.md). + +### Genetec Web Player Samples (`/Samples/Genetec Web Player/`) + + + +Hosting samples for the **Genetec Web Player** (GWP), the JavaScript video player that ships with the Media Gateway. Unlike the SDK samples, these projects do not connect through the .NET Security Center SDK; they demonstrate three different application shells that load `gwp.js` from a Media Gateway and supply it with opaque camera tokens. + + + +**Hosting models demonstrated:** + +- WPF desktop application that hosts GWP in an embedded `WebView2` control, with token retrieval performed natively in .NET +- ASP.NET Core Minimal API application that serves a static page and proxies token requests through a server-side endpoint +- ASP.NET Core Razor Pages application that adds production-ready CSP nonce support and server-rendered configuration on top of the Minimal API pattern + + + +**Prerequisites differ from the SDK samples**: GWP samples require a reachable Media Gateway, a trusted (or development) Media Gateway certificate, and CORS configuration that allows the hosting page's origin. See each sample's README for details. + + ## Sample Project Structure @@ -292,16 +312,17 @@ Remember to use the appropriate version of the Security Center SDK that matches ## SDK Framework Support Matrix -The following table shows which .NET frameworks are supported by each SDK: +The following table shows which .NET frameworks are supported by each SDK or sample group: | SDK | .NET Framework 4.8.1 | .NET 8 | Notes | |-----|:-------------------:|:------:|-------| +| **Genetec Web Player** | ❌ | ✅ | Targets .NET 8 only; ASP.NET Core or WPF + WebView2 | | **Platform SDK** | ✅ | ✅ | .NET 8 requires Security Center SDK 5.12.2+ | | **Media SDK** | ✅ | ❌ | .NET 8 support planned for future release | | **Workspace SDK** | ✅ | ❌ | Client applications use .NET Framework | -| **Plugin SDK** | ✅ | ❌ | .NET 8 support planned for future release | +| **Plugin SDK** | ✅ | ✅ | .NET 8 support for the `ServerModule` requires Security Center 5.13+. The `ClientModule` (Config Tool / Security Desk UI) targets .NET Framework only. See [Building .NET plugins](https://github.com/Genetec/DAP/wiki/plugin-sdk-net8). | -**Important**: Only Platform SDK samples support multi-targeting. All other SDK samples target .NET Framework 4.8.1 exclusively. +**Important**: Only Platform SDK samples in this repository are configured to multi-target. The Plugin, Workspace, and Media SDK samples target .NET Framework 4.8.1 exclusively, even where the SDK itself supports additional runtimes (see Plugin SDK row above). @@ -421,4 +442,4 @@ While this repository is primarily for reference purposes, contributions such as -If you encounter any issues or have questions regarding the Security Center SDK or the provided samples, please reach out to the Genetec support team through the [Genetec Technical Assistance Portal](https://portal.genetec.com/). \ No newline at end of file +If you encounter any issues or have questions regarding the Security Center SDK or the provided samples, please reach out to the Genetec support team through the [Genetec Technical Assistance Portal](https://portal.genetec.com/). diff --git a/Samples/Genetec.Dap.CodeSamples.sln b/Samples/Genetec.Dap.CodeSamples.sln index 08f64efb..900b051f 100644 --- a/Samples/Genetec.Dap.CodeSamples.sln +++ b/Samples/Genetec.Dap.CodeSamples.sln @@ -235,6 +235,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServerSample", "Platform SD EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceProviderSample", "Platform SDK\ResourceProviderSample\ResourceProviderSample.csproj", "{A46BCB50-782B-4946-9620-F90DE462CC30}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Genetec Web Player", "Genetec Web Player", "{C59879F1-F7B6-4995-A620-7BD50F92244E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GwpDesktopPlayerSample", "Genetec Web Player\GwpDesktopPlayerSample\GwpDesktopPlayerSample.csproj", "{1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GwpMinimalApiSample", "Genetec Web Player\GwpMinimalApiSample\GwpMinimalApiSample.csproj", "{C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GwpRazorPagesSample", "Genetec Web Player\GwpRazorPagesSample\GwpRazorPagesSample.csproj", "{F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_NET481|Any CPU = Debug_NET481|Any CPU @@ -1469,6 +1477,30 @@ Global {A46BCB50-782B-4946-9620-F90DE462CC30}.Release_NET8|Any CPU.Build.0 = Release_NET8|Any CPU {A46BCB50-782B-4946-9620-F90DE462CC30}.Release|Any CPU.ActiveCfg = Release|Any CPU {A46BCB50-782B-4946-9620-F90DE462CC30}.Release|Any CPU.Build.0 = Release|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Debug_NET8|Any CPU.ActiveCfg = Debug|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Debug_NET8|Any CPU.Build.0 = Debug|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Release_NET8|Any CPU.ActiveCfg = Release|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Release_NET8|Any CPU.Build.0 = Release|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6}.Release|Any CPU.Build.0 = Release|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Debug_NET8|Any CPU.ActiveCfg = Debug|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Debug_NET8|Any CPU.Build.0 = Debug|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Release_NET8|Any CPU.ActiveCfg = Release|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Release_NET8|Any CPU.Build.0 = Release|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F}.Release|Any CPU.Build.0 = Release|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Debug_NET8|Any CPU.ActiveCfg = Debug|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Debug_NET8|Any CPU.Build.0 = Debug|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Release_NET8|Any CPU.ActiveCfg = Release|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Release_NET8|Any CPU.Build.0 = Release|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1576,6 +1608,9 @@ Global {CB713D02-195C-1E16-FB21-61ABC603D726} = {4F4FBF3C-61E6-41C8-97B0-05A1AA806BA9} {3451F54A-A0CE-704D-194A-2769C953B0A9} = {4F4FBF3C-61E6-41C8-97B0-05A1AA806BA9} {A46BCB50-782B-4946-9620-F90DE462CC30} = {4F4FBF3C-61E6-41C8-97B0-05A1AA806BA9} + {1CEB044B-B52B-25F4-1C08-168EAFD4C5A6} = {C59879F1-F7B6-4995-A620-7BD50F92244E} + {C7C206CB-5A5E-84E9-9A3E-23FA0D563E7F} = {C59879F1-F7B6-4995-A620-7BD50F92244E} + {F6FEAE2D-E83E-FC41-0209-C18D1E6DB7C0} = {C59879F1-F7B6-4995-A620-7BD50F92244E} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B18E6094-5F8C-4A40-ABCC-147C4EB191A0}