StandardPanelComponent class

A stateless widget rendering a standard recording configuration panel.

Displays 3-4 dropdown pickers for configuring basic recording settings. Provides simplified recording options suitable for most event types, hiding advanced controls like layout/orientation/naming that power users need.

Form Fields:

  1. Media Options (always visible):

    • "Record Video" (value: "video")
    • "Record Audio Only" (value: "audio")
  2. Specific Audios (hidden for EventType.broadcast):

    • "Add All" (value: "all") - Records all participant audio
    • "Add All On Screen" (value: "onScreen") - Records only visible participants
    • "Add Host Only" (value: "host") - Records only host audio
  3. Specific Videos (hidden for EventType.broadcast):

    • "Add All" (value: "all") - Records all video streams
    • "Big Screen Only (includes screenshare)" (value: "mainScreen") - Records main view + screenshare
  4. Add HLS (always visible):

    • "True" (value: "true") - Enables HTTP Live Streaming for live playback
    • "False" (value: "false") - Disables HLS (recording only)

Rendering Structure:

Column (crossAxisAlignment: start)
  ├─ Column (Media Options)
  │  ├─ Text ("Media Options:", bold)
  │  ├─ _buildPicker (video/audio)
  │  └─ SizedBox (10px height)
  ├─ [if eventType != broadcast]
  │  ├─ Column (Specific Audios)
  │  │  ├─ Text ("Specific Audios:", bold)
  │  │  ├─ _buildPicker (all/onScreen/host)
  │  │  └─ SizedBox (10px height)
  │  └─ Column (Specific Videos)
  │     ├─ Text ("Specific Videos:", bold)
  │     ├─ _buildPicker (all/mainScreen)
  │     └─ SizedBox (10px height)
  └─ Column (Add HLS)
     ├─ Text ("Add HLS:", bold)
     └─ _buildPicker (true/false)

EventType Filtering:

  • EventType.broadcast: Hides "Specific Audios" and "Specific Videos" (broadcaster controls all sources, no participant filtering needed)
  • EventType.conference/webinar/chat: Shows all 4 fields

Common Use Cases:

  1. Basic Video Recording (Conference):

    StandardPanelComponent(
      options: StandardPanelComponentOptions(
        parameters: RecordingParams(
          recordingMediaOptions: "video",
          recordingAudioOptions: "all",
          recordingVideoOptions: "all",
          recordingAddHLS: false,
          eventType: EventType.conference,
          updateRecordingMediaOptions: (opt) => setState(() => _mediaOpt = opt),
          updateRecordingAudioOptions: (opt) => setState(() => _audioOpt = opt),
          updateRecordingVideoOptions: (opt) => setState(() => _videoOpt = opt),
          updateRecordingAddHLS: (hls) => setState(() => _enableHLS = hls),
        ),
      ),
    )
    
  2. Audio-Only Recording (Podcast Mode):

    StandardPanelComponent(
      options: StandardPanelComponentOptions(
        parameters: RecordingParams(
          recordingMediaOptions: "audio",
          recordingAudioOptions: "all",
          recordingVideoOptions: "mainScreen", // ignored for audio-only
          recordingAddHLS: false,
          eventType: EventType.conference,
          updateRecordingMediaOptions: (opt) => updateState(opt),
          updateRecordingAudioOptions: (opt) => updateState(opt),
          updateRecordingVideoOptions: (opt) => updateState(opt),
          updateRecordingAddHLS: (hls) => updateState(hls),
        ),
      ),
    )
    // Result: Audio-only MP3/M4A with all participant audio mixed
    
  3. Webinar Recording with HLS:

    StandardPanelComponent(
      options: StandardPanelComponentOptions(
        parameters: RecordingParams(
          recordingMediaOptions: "video",
          recordingAudioOptions: "host", // only host audio
          recordingVideoOptions: "mainScreen", // main view + slides
          recordingAddHLS: true, // enable live streaming
          eventType: EventType.webinar,
          updateRecordingMediaOptions: updateMedia,
          updateRecordingAudioOptions: updateAudio,
          updateRecordingVideoOptions: updateVideo,
          updateRecordingAddHLS: updateHLS,
        ),
      ),
    )
    // Result: Video recording with host audio, main screen, and HLS stream
    
  4. Broadcast Recording (Simplified):

    StandardPanelComponent(
      options: StandardPanelComponentOptions(
        parameters: RecordingParams(
          recordingMediaOptions: "video",
          recordingAudioOptions: "all", // not shown in UI
          recordingVideoOptions: "all", // not shown in UI
          recordingAddHLS: true,
          eventType: EventType.broadcast,
          updateRecordingMediaOptions: (opt) => _updateSettings(opt),
          updateRecordingAudioOptions: (_) {}, // no-op
          updateRecordingVideoOptions: (_) {}, // no-op
          updateRecordingAddHLS: (hls) => _updateSettings(hls),
        ),
      ),
    )
    // Only shows "Media Options" and "Add HLS" (no participant filtering)
    

Update Callbacks:

  • Invoked immediately when user changes dropdown selection
  • Should update parent state to reflect new recording configuration
  • Parent component typically stores these in MediasfuParameters for later use
  • Changes not persisted until "Confirm" button clicked in RecordingModal

HLS Streaming:

  • When recordingAddHLS: true, server generates .m3u8 playlist
  • Allows live playback while recording is in progress
  • Increases server load and storage costs
  • Typically used for webinars, broadcasts, or large events

Picker Implementation:

  • Uses custom _buildPicker() helper with DropdownButton
  • Border radius: 10px
  • Padding: 8px vertical, 12px horizontal
  • Light gray background (0xFFE0E0E0)
  • Full-width dropdown

Styling:

  • Label font: Bold, black, 1.5 line height
  • Field spacing: 10px between sections
  • Cross-axis alignment: Start (left-aligned)

Typical Usage Context:

  • RecordingModal "Standard" tab
  • Quick recording setup for non-technical hosts
  • Default recording configuration before switching to advanced panel
Inheritance

Constructors

StandardPanelComponent({Key? key, required StandardPanelComponentOptions options})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
options StandardPanelComponentOptions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited