@granite-js/video 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @granite-js/video
2
2
 
3
+ ## 1.0.18
4
+
5
+ ## 1.0.17
6
+
7
+ ### Patch Changes
8
+
9
+ - c090579: Add disableAudioFocus prop and ViewManager stubs for progressUpdateInterval and textTracks
10
+
3
11
  ## 1.0.16
4
12
 
5
13
  ## 1.0.15
@@ -249,6 +249,10 @@ class GraniteVideoView @JvmOverloads constructor(
249
249
  provider?.setPictureInPictureEnabled(enabled)
250
250
  }
251
251
 
252
+ fun setDisableAudioFocus(disable: Boolean) {
253
+ provider?.setDisableAudioFocus(disable)
254
+ }
255
+
252
256
  fun setPlayInBackground(enabled: Boolean) {
253
257
  provider?.setPlayInBackground(enabled)
254
258
  }
@@ -1,6 +1,7 @@
1
1
  package run.granite.video
2
2
 
3
3
  import android.graphics.Color
4
+ import com.facebook.react.bridge.ReadableArray
4
5
  import com.facebook.react.bridge.ReadableMap
5
6
  import com.facebook.react.module.annotations.ReactModule
6
7
  import com.facebook.react.uimanager.SimpleViewManager
@@ -55,6 +56,9 @@ class GraniteVideoViewManager(
55
56
  view.release()
56
57
  }
57
58
 
59
+ override fun setProgressUpdateInterval(view: GraniteVideoView?, value: Double) {
60
+ }
61
+
58
62
  // Props
59
63
  @ReactProp(name = "source")
60
64
  override fun setSource(view: GraniteVideoView?, source: ReadableMap?) {
@@ -107,6 +111,11 @@ class GraniteVideoViewManager(
107
111
  view?.setPictureInPicture(pictureInPicture)
108
112
  }
109
113
 
114
+ @ReactProp(name = "disableAudioFocus")
115
+ override fun setDisableAudioFocus(view: GraniteVideoView?, disableAudioFocus: Boolean) {
116
+ view?.setDisableAudioFocus(disableAudioFocus)
117
+ }
118
+
110
119
  @ReactProp(name = "playInBackground")
111
120
  override fun setPlayInBackground(view: GraniteVideoView?, playInBackground: Boolean) {
112
121
  view?.setPlayInBackground(playInBackground)
@@ -152,6 +161,9 @@ class GraniteVideoViewManager(
152
161
  view?.setSelectedVideoTrack(type, value)
153
162
  }
154
163
 
164
+ override fun setTextTracks(view: GraniteVideoView?, value: ReadableArray?) {
165
+ }
166
+
155
167
  @ReactProp(name = "viewType")
156
168
  override fun setViewType(view: GraniteVideoView?, viewType: String?) {
157
169
  view?.setUseTextureView(viewType == "texture")
@@ -214,6 +214,9 @@ interface GraniteVideoProvider {
214
214
  // Optional - Resize Mode
215
215
  fun setResizeMode(mode: GraniteVideoResizeMode) {}
216
216
 
217
+ // Optional - Audio Focus
218
+ fun setDisableAudioFocus(disable: Boolean) {}
219
+
217
220
  // Optional - Background Playback
218
221
  fun setPlayInBackground(enabled: Boolean) {}
219
222
  fun setPlayWhenInactive(enabled: Boolean) {}
@@ -247,6 +247,7 @@ export interface NativeProps extends ViewProps {
247
247
  volume?: Float;
248
248
  rate?: Float;
249
249
  repeat?: boolean;
250
+ disableAudioFocus?: boolean;
250
251
  playInBackground?: boolean;
251
252
  playWhenInactive?: boolean;
252
253
  automaticallyWaitsToMinimizeStalling?: boolean;
@@ -193,6 +193,7 @@ export interface NativeProps extends ViewProps {
193
193
  volume?: Float;
194
194
  rate?: Float;
195
195
  repeat?: boolean;
196
+ disableAudioFocus?: boolean;
196
197
  playInBackground?: boolean;
197
198
  playWhenInactive?: boolean;
198
199
  automaticallyWaitsToMinimizeStalling?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/video",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Pluggable video component for React Native with provider selection",
5
5
  "type": "module",
6
6
  "main": "./dist/module/index.js",
@@ -247,6 +247,7 @@ export interface NativeProps extends ViewProps {
247
247
  volume?: Float;
248
248
  rate?: Float;
249
249
  repeat?: boolean;
250
+ disableAudioFocus?: boolean;
250
251
  playInBackground?: boolean;
251
252
  playWhenInactive?: boolean;
252
253
  automaticallyWaitsToMinimizeStalling?: boolean;