Skip to content

Conversation

@saseungmin
Copy link
Member

@saseungmin saseungmin commented Jul 15, 2025

  • Enable simultaneous usage of multiple player instances
  • Implement independent instance management for each player
  • Support concurrent playback without interference

Summary by CodeRabbit

  • New Features

    • Added support for multiple concurrent Vimeo player instances, allowing independent playback and management of each player.
  • Documentation

    • Updated English and Korean documentation to include information and examples for using multiple Vimeo player instances.

- Enable simultaneous usage of multiple player instances
- Implement independent instance management for each player
- Support concurrent playback without interference
@changeset-bot
Copy link

changeset-bot bot commented Jul 15, 2025

🦋 Changeset detected

Latest commit: 788f07f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jul 15, 2025

Walkthrough

This change removes singleton patterns from Vimeo player controller classes, enabling the creation and management of multiple independent player instances. Documentation in both English and Korean is updated to describe and demonstrate multi-instance support, including example code for rendering multiple players concurrently.

Changes

File(s) Change Summary
src/module/WebviewVimeoPlayerController.ts, src/module/WebVimeoPlayerController.ts Removed singleton pattern (instance property and getInstance method); added createInstance static method.
src/VimeoView.tsx, src/VimeoView.web.tsx Switched controller initialization from singleton retrieval to new instance creation; unique DOM IDs for web.
README.md, README-ko_kr.md Added documentation and examples for multiple player instance support.
.changeset/itchy-rooms-crash.md Added changeset entry describing multi-instance support.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant useVimeoPlayer
    participant VimeoView
    participant WebviewVimeoPlayerController

    App->>useVimeoPlayer: Call hook for each player
    useVimeoPlayer->>VimeoView: Pass refs and props
    VimeoView->>WebviewVimeoPlayerController: createInstance(webViewRef)
    WebviewVimeoPlayerController-->>VimeoView: Return new controller instance
    VimeoView-->>useVimeoPlayer: Assign controller to playerRef
    Note over VimeoView,WebviewVimeoPlayerController: Each player is managed independently
Loading

Possibly related PRs

Poem

Hopping along the video stream,
Now many bunnies can watch and dream!
No more single burrow for every show—
Each player hops where it wants to go.
With docs and code now set anew,
Multi-instance magic for every view!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5337b8b and 788f07f.

📒 Files selected for processing (1)
  • src/VimeoView.web.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/VimeoView.web.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 15, 2025

Deploying react-native-vimeo-bridge-example with  Cloudflare Pages  Cloudflare Pages

Latest commit: 788f07f
Status: ✅  Deploy successful!
Preview URL: https://e9983b28.react-native-vimeo-bridge-example.pages.dev
Branch Preview URL: https://feat-multiple-player-support.react-native-vimeo-bridge-example.pages.dev

View logs

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa294d9 and 5337b8b.

📒 Files selected for processing (7)
  • .changeset/itchy-rooms-crash.md (1 hunks)
  • README-ko_kr.md (2 hunks)
  • README.md (2 hunks)
  • src/VimeoView.tsx (1 hunks)
  • src/VimeoView.web.tsx (1 hunks)
  • src/module/WebVimeoPlayerController.ts (1 hunks)
  • src/module/WebviewVimeoPlayerController.ts (1 hunks)
🔇 Additional comments (10)
src/module/WebVimeoPlayerController.ts (1)

6-8: LGTM! Singleton pattern successfully removed for multi-instance support.

The replacement of the singleton pattern with createInstance() method correctly enables multiple independent player instances. Each call returns a new controller instance, supporting the concurrent player functionality.

src/VimeoView.web.tsx (1)

19-19: LGTM! Correctly updated to create new instances.

The change from getInstance() to createInstance() properly supports multiple concurrent player instances.

.changeset/itchy-rooms-crash.md (1)

1-10: LGTM! Changeset properly documents the new feature.

The changeset correctly describes the multi-instance support feature with appropriate versioning and clear benefits.

src/VimeoView.tsx (1)

216-216: LGTM! Correctly updated to create new instances.

The change from getInstance() to createInstance() properly supports multiple concurrent player instances in the WebView implementation.

README.md (2)

19-19: LGTM! Feature list updated to include multi-instance support.

The addition to the key features list accurately represents the new capability.


146-165: LGTM! Comprehensive documentation for multiple player support.

The new section clearly explains the multi-instance capability with a practical example. The explanation about independent instance management and automatic cleanup is accurate and helpful.

README-ko_kr.md (2)

19-19: LGTM: Clear feature addition to the list.

The multi-instance support feature addition is well-placed in the features list and accurately describes the new capability.


146-165: LGTM: Comprehensive documentation for multi-instance support.

The new section provides clear explanation of the multi-instance functionality with a practical code example. The Korean translation is accurate and the automatic cleanup mention is important for developers to understand memory management.

src/module/WebviewVimeoPlayerController.ts (2)

141-144: LGTM: Proper cleanup implementation.

The dispose method correctly clears pending commands and destroys the instance. Since the singleton pattern was removed, there's no need to reset a static instance property.


13-15: Factory Pattern Migration Verified Across Controllers

All controller classes now consistently use the createInstance factory method, and no getInstance usages remain:

  • src/module/WebviewVimeoPlayerController.ts: Lines 13–15 define static createInstance(webViewRef…).
  • src/module/WebVimeoPlayerController.ts: Lines 6–8 define static createInstance().

The singleton pattern has been fully removed and replaced with per-call instance creation. Instance-specific cleanup in each class’s dispose() method remains unchanged and continues to manage resources correctly.

No further changes required. Code changes approved.

@saseungmin saseungmin merged commit d8a8dc2 into main Jul 15, 2025
6 checks passed
@saseungmin saseungmin deleted the feat/multiple-player-support branch July 15, 2025 13:18
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