@granite-js/video 1.0.10 → 1.0.12
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 +9 -0
- package/android/src/main/java/run/granite/video/GraniteVideoView.kt +2 -2
- package/android/src/main/java/run/granite/video/provider/GraniteVideoProvider.kt +2 -2
- package/dist/module/GraniteVideoNativeComponent.ts +2 -2
- package/dist/typescript/GraniteVideoNativeComponent.d.ts +2 -2
- package/dist/typescript/types.d.ts +2 -2
- package/ios/GraniteVideoProvider.swift +3 -2
- package/ios/GraniteVideoView.mm +13 -2
- package/package.json +1 -1
- package/src/GraniteVideoNativeComponent.ts +2 -2
- package/src/types.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -76,8 +76,8 @@ class GraniteVideoView @JvmOverloads constructor(
|
|
|
76
76
|
uri = source["uri"] as? String,
|
|
77
77
|
type = source["type"] as? String,
|
|
78
78
|
startPosition = (source["startPosition"] as? Number)?.toDouble() ?: 0.0,
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
startTime = (source["startTime"] as? Number)?.toDouble() ?: 0.0,
|
|
80
|
+
endTime = (source["endTime"] as? Number)?.toDouble() ?: 0.0,
|
|
81
81
|
headers = headers,
|
|
82
82
|
drm = parseDrm(source["drm"] as? Map<String, Any>),
|
|
83
83
|
isNetwork = source["isNetwork"] as? Boolean,
|
|
@@ -34,8 +34,8 @@ data class GraniteVideoSource(
|
|
|
34
34
|
val uri: String? = null,
|
|
35
35
|
val type: String? = null,
|
|
36
36
|
val startPosition: Double = 0.0,
|
|
37
|
-
val
|
|
38
|
-
val
|
|
37
|
+
val startTime: Double = 0.0,
|
|
38
|
+
val endTime: Double = 0.0,
|
|
39
39
|
val headers: Map<String, String>? = null,
|
|
40
40
|
val drm: GraniteVideoDrmConfig? = null,
|
|
41
41
|
val isNetwork: Boolean? = null,
|
|
@@ -81,8 +81,8 @@ interface NativeVideoSource {
|
|
|
81
81
|
uri?: string;
|
|
82
82
|
type?: string;
|
|
83
83
|
startPosition?: Double;
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
startTime?: Double;
|
|
85
|
+
endTime?: Double;
|
|
86
86
|
isNetwork?: boolean;
|
|
87
87
|
isAsset?: boolean;
|
|
88
88
|
isLocalAssetFile?: boolean;
|
|
@@ -56,8 +56,8 @@ interface NativeVideoSource {
|
|
|
56
56
|
uri?: string;
|
|
57
57
|
type?: string;
|
|
58
58
|
startPosition?: Double;
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
startTime?: Double;
|
|
60
|
+
endTime?: Double;
|
|
61
61
|
isNetwork?: boolean;
|
|
62
62
|
isAsset?: boolean;
|
|
63
63
|
isLocalAssetFile?: boolean;
|
|
@@ -71,8 +71,8 @@ export interface VideoSource {
|
|
|
71
71
|
patchVer?: number;
|
|
72
72
|
headers?: VideoSourceHeaders;
|
|
73
73
|
startPosition?: number;
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
startTime?: number;
|
|
75
|
+
endTime?: number;
|
|
76
76
|
drm?: DrmConfig;
|
|
77
77
|
textTracks?: TextTrack[];
|
|
78
78
|
metadata?: VideoMetadata;
|
|
@@ -54,8 +54,8 @@ import AVFoundation
|
|
|
54
54
|
@objc public var uri: String?
|
|
55
55
|
@objc public var type: String?
|
|
56
56
|
@objc public var startPosition: Double = 0
|
|
57
|
-
@objc public var
|
|
58
|
-
@objc public var
|
|
57
|
+
@objc public var startTime: Double = 0
|
|
58
|
+
@objc public var endTime: Double = 0
|
|
59
59
|
@objc public var headers: [String: String]?
|
|
60
60
|
@objc public var drm: GraniteVideoDrmConfig?
|
|
61
61
|
|
|
@@ -141,6 +141,7 @@ import AVFoundation
|
|
|
141
141
|
@objc optional func videoDidBecomeIdle()
|
|
142
142
|
@objc optional func videoReadyForDisplay()
|
|
143
143
|
@objc optional func videoAudioBecomingNoisy()
|
|
144
|
+
@objc optional func videoAudioFocusChanged(hasAudioFocus: Bool)
|
|
144
145
|
@objc optional func videoFullscreenPlayerWillPresent()
|
|
145
146
|
@objc optional func videoFullscreenPlayerDidPresent()
|
|
146
147
|
@objc optional func videoFullscreenPlayerWillDismiss()
|
package/ios/GraniteVideoView.mm
CHANGED
|
@@ -244,8 +244,8 @@ using namespace facebook::react;
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
videoSource.startPosition = source.startPosition;
|
|
247
|
-
videoSource.
|
|
248
|
-
videoSource.
|
|
247
|
+
videoSource.startTime = source.startTime;
|
|
248
|
+
videoSource.endTime = source.endTime;
|
|
249
249
|
|
|
250
250
|
[_provider loadSource:videoSource];
|
|
251
251
|
|
|
@@ -534,6 +534,17 @@ using namespace facebook::react;
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
+
- (void)videoAudioFocusChangedWithHasAudioFocus:(BOOL)hasAudioFocus
|
|
538
|
+
{
|
|
539
|
+
if (_eventEmitter) {
|
|
540
|
+
auto emitter = std::static_pointer_cast<GraniteVideoViewEventEmitter const>(_eventEmitter);
|
|
541
|
+
facebook::react::GraniteVideoViewEventEmitter::OnVideoAudioFocusChanged event = {
|
|
542
|
+
.hasAudioFocus = hasAudioFocus
|
|
543
|
+
};
|
|
544
|
+
emitter->onVideoAudioFocusChanged(event);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
537
548
|
- (void)videoFullscreenPlayerWillPresent
|
|
538
549
|
{
|
|
539
550
|
if (_eventEmitter) {
|
package/package.json
CHANGED
|
@@ -81,8 +81,8 @@ interface NativeVideoSource {
|
|
|
81
81
|
uri?: string;
|
|
82
82
|
type?: string;
|
|
83
83
|
startPosition?: Double;
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
startTime?: Double;
|
|
85
|
+
endTime?: Double;
|
|
86
86
|
isNetwork?: boolean;
|
|
87
87
|
isAsset?: boolean;
|
|
88
88
|
isLocalAssetFile?: boolean;
|
package/src/types.ts
CHANGED
|
@@ -105,8 +105,8 @@ export interface VideoSource {
|
|
|
105
105
|
patchVer?: number;
|
|
106
106
|
headers?: VideoSourceHeaders;
|
|
107
107
|
startPosition?: number;
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
startTime?: number;
|
|
109
|
+
endTime?: number;
|
|
110
110
|
drm?: DrmConfig;
|
|
111
111
|
textTracks?: TextTrack[];
|
|
112
112
|
metadata?: VideoMetadata;
|