Sorry to send through so many issues towards the end of the year ha
The SiprixVideoView widget currently shows a hardcoded Placeholder() widget when renderer.hasTexture is false:
@override
Widget build(BuildContext context) {
return _renderer.hasTexture
? AspectRatio(aspectRatio: _renderer.aspectRatio,
child: Texture(textureId: _renderer.textureId, filterQuality: filterQuality))
: const Placeholder(); // ← Hardcoded placeholder
}
Apps cannot match their brand/design system when video isn't available
Could we add an optional placeholder parameter to SiprixVideoView:
class SiprixVideoView extends StatelessWidget {
const SiprixVideoView(
this._renderer, {
Key? key,
this.placeholder, // ← New optional parameter
}) : super(key: key);
final SiprixVideoRenderer _renderer;
final Widget? placeholder; // ← New field
final FilterQuality filterQuality = FilterQuality.low;
@override
Widget build(BuildContext context) {
return _renderer.hasTexture
? AspectRatio(
aspectRatio: _renderer.aspectRatio,
child: Texture(
textureId: _renderer.textureId,
filterQuality: filterQuality,
),
)
: placeholder ?? const Placeholder(); // ← Use custom or fallback to default
}
}
Usage Example
// Custom placeholder matching app design
SiprixVideoView(
_remoteRenderer,
placeholder: Container(
color: Colors.black,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(Icons.videocam_off, size: 64, color: Colors.white54),
SizedBox(height: 16),
Text('Camera not available', style: TextStyle(color: Colors.white54)),
],
),
),
),
)
I tried wrapping SiprixVideoView in a custom widget works but checking if the renderer has a texture leads to true because the placeholder comes through so it just shows that.
Sorry to send through so many issues towards the end of the year ha
The
SiprixVideoViewwidget currently shows a hardcodedPlaceholder()widget whenrenderer.hasTextureis false:Apps cannot match their brand/design system when video isn't available
Could we add an optional
placeholderparameter toSiprixVideoView:Usage Example
I tried wrapping
SiprixVideoViewin a custom widget works but checking if the renderer has a texture leads to true because the placeholder comes through so it just shows that.