Skip to content

频道切换速度优化#8

Closed
lbb00 wants to merge 14 commits into
mainfrom
cursor/-bc-b3e93374-5caf-4678-a0ae-ba2ebf70fd9b-3aa2
Closed

频道切换速度优化#8
lbb00 wants to merge 14 commits into
mainfrom
cursor/-bc-b3e93374-5caf-4678-a0ae-ba2ebf70fd9b-3aa2

Conversation

@lbb00
Copy link
Copy Markdown
Member

@lbb00 lbb00 commented Mar 8, 2026

Accelerate channel switching by removing artificial UI delays, reusing player instances, and optimizing the local proxy for streaming.

This PR addresses three key bottlenecks identified in the channel switching flow:

  1. UI Delay: Removed a fixed 220ms delay and double-click logic in channel selection, allowing instant playback on single click.
  2. Player Initialization: Refactored the video player to reuse instances when switching channels with the same protocol, avoiding costly full destruction and recreation.
  3. Network Proxy: Modified the Tauri proxy to use a single reqwest::Client for connection pooling and stream non-m3u8 responses, reducing first-byte latency for media segments.

Open in Web Open in Cursor 

@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 8, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

cursoragent and others added 2 commits March 8, 2026 15:10
Co-authored-by: lbb <mr@lbb00.com>
@cursor cursor Bot force-pushed the cursor/-bc-b3e93374-5caf-4678-a0ae-ba2ebf70fd9b-3aa2 branch from a5cb408 to a13cc44 Compare March 8, 2026 15:53
cursoragent and others added 12 commits March 8, 2026 16:20
Co-authored-by: lbb <mr@lbb00.com>
Co-authored-by: lbb <mr@lbb00.com>
Co-authored-by: lbb <mr@lbb00.com>
Co-authored-by: lbb <mr@lbb00.com>
Co-authored-by: lbb <mr@lbb00.com>
Co-authored-by: lbb <mr@lbb00.com>
Co-authored-by: lbb <mr@lbb00.com>
- fix(security): replace hardcoded /opt/cursor/logs with app_data_dir()
- fix(security): add SSRF validation for proxy /stream and /warm endpoints
- perf(logger): replace blocking sync Mutex+file I/O with async mpsc channel writer thread
- refactor: remove excessive runtime logging in orchestrator, proxy, and commands
- refactor: extract useDualPlaybackEngine hook from VideoPlayer (SRP)
- refactor: split loadChannelInSlot into loadHlsSlot/loadMpegtsSlot/loadNativeSlot
- refactor: replace magic numbers with named constants

Amp-Thread-ID: https://ampcode.com/threads/T-019cd3cb-257d-77fc-bda5-bbaf67c96654
Co-authored-by: Amp <amp@ampcode.com>
@lbb00 lbb00 marked this pull request as ready for review March 10, 2026 18:22
@lbb00 lbb00 closed this Mar 10, 2026
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