feat: add plugins management (#3909)

This commit is contained in:
Olivier Bouillet
2024-06-25 08:55:32 +02:00
committed by GitHub
parent 3cfb96adb9
commit 91d27a6009
28 changed files with 828 additions and 140 deletions

23
ios/Video/RNVPlugin.swift Normal file
View File

@@ -0,0 +1,23 @@
//
// RNVPlugin.swift
// react-native-video
//
import Foundation
public protocol RNVPlugin {
/**
* Function called when a new player is created
* @param id: a random string identifying the player
* @param player: the instantiated player reference
*/
func onInstanceCreated(id: String, player: Any)
/**
* Function called when a player should be destroyed
* when this callback is called, the plugin shall free all
* resources and release all reference to Player object
* @param id: a random string identifying the player
* @param player: the player to release
*/
func onInstanceRemoved(id: String, player: Any)
}