Skip to content

Commit 0593000

Browse files
committed
www
1 parent 2c38dde commit 0593000

3 files changed

Lines changed: 20 additions & 14 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-video-provider",
3-
"version": "0.2.9",
3+
"version": "0.3.0",
44
"description": "Singleton-engine video library for React Native (one native player, many surfaces)",
55
"main": "./lib/module/index.js",
66
"types": "./lib/typescript/src/index.d.ts",

src/components/VideoControls.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,6 @@ export function VideoControls({
124124
onDoubleTapLeft={() => manager.seekBy(-doubleTapSeek)}
125125
onDoubleTapRight={() => manager.seekBy(doubleTapSeek)}
126126
/>
127-
{/* Live badge: stuck to the top-right, always visible while live —
128-
it does NOT hide with the auto-hiding controls. */}
129-
{live && liveIcon ? (
130-
<View style={styles.liveBadge} pointerEvents="none">
131-
{liveIcon()}
132-
</View>
133-
) : null}
134127
{visible ? (
135128
<View style={styles.chrome} pointerEvents="box-none">
136129
<View style={styles.topRow}>
@@ -188,6 +181,14 @@ export function VideoControls({
188181
</View>
189182
</View>
190183
) : null}
184+
{/* Live badge: top-left, above the controls, always visible while live —
185+
it does NOT hide with the auto-hiding chrome (rendered last + high
186+
zIndex so it stays on top). */}
187+
{live && liveIcon ? (
188+
<View style={styles.liveBadge} pointerEvents="none">
189+
{liveIcon()}
190+
</View>
191+
) : null}
191192
</View>
192193
);
193194
}
@@ -204,8 +205,10 @@ const styles = StyleSheet.create({
204205
},
205206
liveBadge: {
206207
position: 'absolute',
207-
top: 12,
208-
right: 12,
208+
top: 10,
209+
left: 10,
210+
zIndex: 10,
211+
elevation: 10,
209212
},
210213
topRow: {
211214
flexDirection: 'row',

src/core/VideoManager.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,20 @@ export class VideoManager {
403403
if (this.store.getState().fullscreen) {
404404
return;
405405
}
406-
this.set({ fullscreen: true, floating: false });
407-
this.setMode('fullscreen');
408406
// `enter` is often passed straight to onPress, so the argument may be a
409407
// press event — only honor real orientation values.
410408
const explicit = ORIENTATION_LOCKS.includes(orientation as OrientationLock)
411409
? (orientation as OrientationLock)
412410
: undefined;
413411
// Explicit arg (incl. 'auto' for sensor-follow) > prop > locked landscape.
414412
const lock = explicit ?? this.fullscreenOrientationDefault ?? 'landscape';
415-
// Stored so the iOS fullscreen host can lock the Modal's supportedOrientations.
416-
this.set({ fullscreenLock: lock });
413+
// CRITICAL: set `fullscreen` and `fullscreenLock` in ONE update so the iOS
414+
// fullscreen Modal mounts with the right `supportedOrientations` from the
415+
// first render. If the Modal mounted with the default first and the lock
416+
// arrived a render later, iOS would present it portrait and never
417+
// re-rotate an already-presented modal.
418+
this.set({ fullscreen: true, floating: false, fullscreenLock: lock });
419+
this.setMode('fullscreen');
417420
NativeAuVideo.enterFullscreen(lock);
418421
this.events.emit('onEnterFullscreen', undefined);
419422
}

0 commit comments

Comments
 (0)