Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add plugins management #3909

Merged

Conversation

freeboub
Copy link
Collaborator

@freeboub freeboub commented Jun 14, 2024

Summary

Create a plugin system to allow other package to retrieve the player handle.
These side package can mainly handle analytics events

Motivation

Add an easy way to track analytics management.
will answer to discussion: #3564

Changes

on android and IOS,
Add ReactNativeVideoManager, singleton to access to the package entry point
Each view register themselves in ReactNativeVideoManager
Add apis to register plugins in ReactNativeVideoManager
When creating a new player plugin system will be called (see documentation)
A sample plugin has also been added to test

Test plan

N/A

freeboub and others added 23 commits May 5, 2024 21:06
…ideo

# Conflicts:
#	android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerViewManager.java
#	src/Video.tsx
…fix/avoidVideoResizingFlickering

# Conflicts:
#	.github/ISSUE_TEMPLATE/bug-report.yml
* fix: ensure player doesn't start when view is unmounted
freeboub and others added 3 commits June 18, 2024 09:12
…ideo into feat/addAnalyticsPlugManagement

# Conflicts:
#	android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java
#	examples/basic/ios/Podfile.lock
…/react-native-video into feat/addAnalyticsPlugManagement

# Conflicts:
#	examples/basic/ios/Podfile.lock
Copy link
Collaborator

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

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

Code and "idea" looks good to me 👍
I am also thinking about changing naming from "analytics plugins" -> "plugins" bcs this will allow to do way more things - not just analytics (or at last I think that)

I have not tested it yet - but will try do let you know to end of the week

@freeboub
Copy link
Collaborator Author

Code and "idea" looks good to me 👍 I am also thinking about changing naming from "analytics plugins" -> "plugins" bcs this will allow to do way more things - not just analytics (or at last I think that)

I have not tested it yet - but will try do let you know to end of the week

I agree for the renaming, I will do it. I tried yesterday to implement a thumbnail preview feature with the plugin system, but the sample I found are not so simple (thumbnails in mjpeg format). I will try again in few days !

@KrzysztofMoch KrzysztofMoch changed the title Feat/add analytics plug management feat: add plugins management Jun 19, 2024
@KrzysztofMoch
Copy link
Collaborator

@freeboub I have tested this PR (via example plugin - thanks for making it 😄) and it works on iOS and Android - Great Job!

…ideo into feat/addAnalyticsPlugManagement

# Conflicts:
#	examples/basic/ios/Podfile.lock
#	examples/basic/ios/videoplayer.xcodeproj/project.pbxproj
#	examples/basic/tsconfig.json
@freeboub
Copy link
Collaborator Author

Code and "idea" looks good to me 👍 I am also thinking about changing naming from "analytics plugins" -> "plugins" bcs this will allow to do way more things - not just analytics (or at last I think that)

I did the change! THanks

@freeboub freeboub merged commit 91d27a6 into TheWidlarzGroup:master Jun 25, 2024
10 checks passed
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.

None yet

2 participants