@@ -20,27 +20,29 @@ interface RNVExoplayerPlugin : RNVPlugin {
20
20
21
21
/* *
22
22
* Optional function that allows the plugin to override the media data source factory,
23
- * which is responsible for loading the video data.
24
- * @return A lambda that takes a [Source] and the current [DataSource.Factory],
25
- * and returns a custom [DataSource.Factory], or null to use the default one.
23
+ * which is responsible for loading media data.
24
+ * @param source The media source being initialized.
25
+ * @param mediaDataSourceFactory The current default data source factory.
26
+ * @return A custom [DataSource.Factory] if override is needed, or null to use default.
26
27
*/
27
- fun overrideMediaDataSourceFactory (): (( Source , DataSource .Factory ) -> DataSource .Factory ? ) ? = null
28
+ fun overrideMediaDataSourceFactory (source : Source , mediaDataSourceFactory : DataSource .Factory ): DataSource .Factory ? = null
28
29
29
30
/* *
30
- * Optional function that allows plugin to override the MediaItem builder
31
- * before the MediaItem is created.
32
- * @return A lambda that takes a [Source] and the current [MediaItem.Builder],
33
- * and returns a modified [MediaItem.Builder], or null if no override is needed.
31
+ * Optional function that allows the plugin to modify the [MediaItem.Builder]
32
+ * before the final [MediaItem] is created.
33
+ * @param source The source from which the media item is being built.
34
+ * @param mediaItemBuilder The default [MediaItem.Builder] instance.
35
+ * @return A modified builder instance if override is needed, or null to use original.
34
36
*/
35
- fun overrideMediaItemBuilder (): (( Source , MediaItem .Builder ) -> MediaItem .Builder ? ) ? = null
37
+ fun overrideMediaItemBuilder (source : Source , mediaItemBuilder : MediaItem .Builder ): MediaItem .Builder ? = null
36
38
37
39
/* *
38
40
* Optional function that allows the plugin to control whether caching should be disabled
39
41
* for a given video source.
40
- * @return A lambda that takes a [Source] and returns true if caching should be disabled,
41
- * or false to allow caching. Returns null to use the default behavior .
42
+ * @param source The video source being loaded.
43
+ * @return true to disable caching, false to keep it enabled .
42
44
*/
43
- fun shouldDisableCache (): (( source: Source ) -> Boolean ) ? = null
45
+ fun shouldDisableCache (source : Source ): Boolean = false
44
46
45
47
/* *
46
48
* Function called when a new player is created
0 commit comments