feat: add plugins management (#3909)
This commit is contained in:
23
ios/Video/RNVPlugin.swift
Normal file
23
ios/Video/RNVPlugin.swift
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user