
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@videosdk.live/react-native-pip-android
Advanced tools
Add picture in picture support to react native android application
Add picture in picture (PiP) support to React Native Android applications with full control over PiP mode and dimensions.
npm install @videosdk.live/react-native-pip-android
# or
yarn add @videosdk.live/react-native-pip-android
Add the following to your android/app/src/main/AndroidManifest.xml:
<activity
android:name=".MainActivity"
android:supportsPictureInPicture="true"
android:resizeableActivity="true"
... >
import PipHandler from '@videosdk.live/react-native-pip-android';
// Enter PiP mode with custom dimensions
PipHandler.enterPipMode(400, 300);
import PipHandler from '@videosdk.live/react-native-pip-android';
// Enable auto PiP mode (for meeting screens)
PipHandler.setMeetingScreenState(true);
// Disable auto PiP mode
PipHandler.setMeetingScreenState(false);
// Check current auto PiP state
const isEnabled = await PipHandler.getMeetingScreenState();
import PipHandler from '@videosdk.live/react-native-pip-android';
// Set custom default dimensions
PipHandler.setDefaultPipDimensions(500, 400);
// Get current default dimensions
const dimensions = await PipHandler.getDefaultPipDimensions();
console.log(`Width: ${dimensions.width}, Height: ${dimensions.height}`);
import { usePipModeListener } from '@videosdk.live/react-native-pip-android';
function MyComponent() {
const inPipMode = usePipModeListener();
if (inPipMode) {
return <Text>Currently in PiP Mode</Text>;
}
return <Text>Normal Mode</Text>;
}
| Method | Parameters | Returns | Description |
|---|---|---|---|
enterPipMode(width, height) | width: number, height: number | void | Enter PiP mode with custom dimensions |
setMeetingScreenState(value) | value: boolean | void | Enable/disable auto PiP mode |
getMeetingScreenState() | None | Promise<boolean> | Get current auto PiP mode state |
setDefaultPipDimensions(width, height) | width: number, height: number | void | Set custom default dimensions |
getDefaultPipDimensions() | None | Promise<{width: number, height: number}> | Get current default dimensions |
| Hook | Returns | Description |
|---|---|---|
usePipModeListener() | boolean | Returns current PiP mode state |
The following permissions are automatically added:
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
FAQs
Add picture in picture support to react native android application
We found that @videosdk.live/react-native-pip-android demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.