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:
@@ -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;
|
||||
|
||||
@@ -60,3 +60,21 @@
|
||||
--sp-badge-surface: var(--sp-badge-bg, rgba(0, 0, 0, 0.72));
|
||||
--sp-badge-color: var(--sp-badge-text, #dde2e8);
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// Full AV Replacement Mode: Hide Foundry's AV Dock
|
||||
// ============================================================
|
||||
// When module is active with stream-access mode, completely hide
|
||||
// Foundry's native AV dock UI and replace it with our ScryingPoolStrip
|
||||
// This implements the full replacement architecture (not overlay)
|
||||
// ============================================================
|
||||
|
||||
// Hide the entire AV dock container
|
||||
#av {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
// Also hide individual camera views in case they're rendered elsewhere
|
||||
.camera-view {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user