Skip to content

Comments

Fix InputVolumeMeters event streaming and optimize v5.x event subscription#1

Draft
Copilot wants to merge 6 commits intorefactor/update-obs-websocket-v5-implementationfrom
copilot/work-on-markdown-files
Draft

Fix InputVolumeMeters event streaming and optimize v5.x event subscription#1
Copilot wants to merge 6 commits intorefactor/update-obs-websocket-v5-implementationfrom
copilot/work-on-markdown-files

Conversation

Copy link

Copilot AI commented Jan 13, 2026

Audio level meters loaded initially but stopped updating. Event subscription included undefined bits. Legacy v4.x event types remained in codebase.

Changes

Critical: Fix audio level streaming

  • Manage StreamSubscription lifecycle in DashboardStore - cancel previous before creating new
  • Prevents multiple listeners on reconnect that caused event loss
  • Add cleanup in stopTimers()

Optimize event subscription bitmask

  • 13107167583 (2047 standard + 65536 InputVolumeMeters)
  • Remove undefined bits 11-15
  • Document bit positions: 2^0 through 2^10 = 2047, 2^16 = 65536

Remove legacy v4.x code

  • Delete unused SwitchScenes event type
  • Add TODO for ScenesChanged verification

Documentation

  • Add troubleshooting section to README with OBS version compatibility matrix
  • Document v5.x protocol in NetworkHelper with links to official spec

Example

// Before: Multiple listeners created on reconnect
void handleStream() {
  GetIt.instance<NetworkStore>().watchOBSStream().listen(...);
}

// After: Managed subscription
StreamSubscription? _eventStreamSubscription;
void handleStream() {
  _eventStreamSubscription?.cancel();
  _eventStreamSubscription = GetIt.instance<NetworkStore>().watchOBSStream().listen(...);
}

Event data access patterns verified correct - BaseEvent extracts eventData, BaseResponse extracts responseData. All request parameters confirmed v5.x compliant.

Original prompt

There are .md files for you to work down in this branch. perform all of the work and do not stop until all of the items have been completed.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits January 13, 2026 14:28
- Add StreamSubscription management to DashboardStore
- Cancel previous subscription before creating new listener
- Prevent multiple listeners on reconnect causing event loss
- Clean up subscription in stopTimers method

Co-authored-by: BarbellDwarf <78000963+BarbellDwarf@users.noreply.github.com>
- Change eventSubscriptions from 131071 to 67583
- Remove undefined intermediate bits (11-15)
- Use cleaner value: 2047 (standard) + 65536 (InputVolumeMeters)
- Add comprehensive inline documentation explaining bitmask
- Document high-volume event requirements

Co-authored-by: BarbellDwarf <78000963+BarbellDwarf@users.noreply.github.com>
- Remove unused SwitchScenes event type (legacy v4.x)
- Add warning comment on ScenesChanged for verification
- Document that v5.x should use SceneCreated/SceneRemoved instead
- Clean up event type enum

Co-authored-by: BarbellDwarf <78000963+BarbellDwarf@users.noreply.github.com>
- Add troubleshooting section to README with common issues
- Document OBS version compatibility matrix
- Add v5.x protocol overview to NetworkHelper
- Document key protocol features and changes from v4.x
- Include links to official protocol documentation

Co-authored-by: BarbellDwarf <78000963+BarbellDwarf@users.noreply.github.com>
- Clarify bitmask documentation with bit positions (2^n format)
- Make it clear bits sum to values, not equal them directly
- Add TODO tag to ScenesChanged event for tracking
- Improve specificity of verification needed comment

Co-authored-by: BarbellDwarf <78000963+BarbellDwarf@users.noreply.github.com>
Copilot AI changed the title [WIP] Complete all tasks in markdown files Fix InputVolumeMeters event streaming and optimize v5.x event subscription Jan 13, 2026
Copilot AI requested a review from BarbellDwarf January 13, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants