Repository navigation
Improve MediaWebPart modernization mappings - #1307
Conversation
Validate iframe media without trusted embed caches, and resolve file identities only in the selected File and Media branch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the existing BuiltIn mapping API and media behavior unchanged while separating media-specific helpers from BuiltIn.cs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the partial-class split with an internal MediaWebPartMapping helper, retain short public mapping functions in BuiltIn, and share JSON/URL utilities through FunctionsBase. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Playback screenshotsPlayer-only crops from the browser verification; tenant/account details are excluded and fixture filenames are redacted. These were captured before the behavior-preserving helper extraction. Playback was rechecked successfully on the final PR commit. EmbedThe migrated Embed component rendered the video, and Playwright confirmed playback time advancing without a media error. Video frame: Big Buck Bunny, (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org, CC BY 3.0. Screenshot cropped to the player. File and Media: same-site conversionThe generated one-second MP4 played to completion. The native player shows Replay and File and Media: cross-site conversionThe copied destination MP4 also played to completion, with the destination file identities verified separately. All run-owned test pages, videos, and copied asset folders were cleaned up after verification. |
Reduce repetitive VideoSet cases and lower-priority validation variations while retaining mapping order, unsafe embed, missing media, and cross-site identity coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>



Summary
DocumentEmbedLookupbehavior and the global function pipeline unchanged.BuiltIn.cs, with media implementation inMediaWebPartMapping.csand shared encoding/URL helpers inFunctionsBase. Update only the Media sections in both mapping XML copies.Validation
dotnet build .\src\lib\PnP.Framework\PnP.Framework.csproj -f net8.0 --no-restorepassed.ConvertTo-PnPPagewith explicit mapping/connection and isolated, hash-verified rebuilt Framework binaries. Read back saved controls and compared their identities to the actual files.Scope and limitations