Story 4.2: Implement full AV replacement with WebRTC stream access

- Update FoundryAdapter to properly detect and expose WebRTC stream access
- Modify ScryingPoolStrip to create video elements with WebRTC streams
- Add video container to roster-strip.hbs template with conditional rendering
- Add CSS to hide Foundry's AV dock (#av and .camera-view)
- Add CSS styling for video containers and elements
- Fix unused variable in FoundryAdapter.buildWebRTCSurface
- Add comprehensive test script for stream access implementation

Architecture: Full replacement mode where module hides Foundry's AV dock
and creates its own video elements using game.webrtc.client.getMediaStreamForUser()

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-05-24 09:12:06 +02:00
parent 20d13fc678
commit c4a375f4e3
7 changed files with 479 additions and 33 deletions
+32 -1
View File
@@ -93,6 +93,19 @@
}
}
// Video container for WebRTC stream (full AV replacement mode)
.sp-participant-video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
z-index: 1;
}
.sp-avatar__img {
width: 32px;
height: 32px;
@@ -101,6 +114,24 @@
flex-shrink: 0;
}
// Video element styling
.sp-participant-video__element {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
background: hsl(220, 15%, 18%);
.is-expanded & {
border-radius: 4px;
}
}
// Hide avatar image when video stream is active (has video element)
.sp-participant-video:not(:empty) ~ .sp-avatar__img {
display: none;
}
.sp-avatar__corner-badge {
position: absolute;
bottom: 2px;
@@ -229,7 +260,7 @@
z-index: 10;
&::before {
content: '\f023'; // fa-lock
content: '\f023'; //fa-lock
font-family: 'Font Awesome 6 Free';
font-weight: 900;
font-size: 1.2rem;