u/shakya47

Why is Picture-in-Picture only for <video>? I built pip-it-up to pop any React component into a native floating window

Why is Picture-in-Picture only for <video>? I built pip-it-up to pop any React component into a native floating window

Hey r/reactjs,

Video PiP floats a player over your desktop. But why should video be the only thing that gets that?

I wanted to tear away small, interactive parts of a web app, a code editor, a checklist, a chat widget and keep them floating on top of my IDE while I work. Single-screen focus, no tab juggling.

The browser's Document PiP API makes this possible, but using it raw in React is a mess:

  • Tailwind/CSS-in-JS styles vanish instantly (new document context)
  • Moving DOM nodes wipes React state, focus, and cursor positions
  • Safari and Firefox don't support it at all

So I built pip-it-up https://pip-it-up.vercel.app/ to handle all of this:

  • Real-time style syncing (Tailwind, Emotion, CSS Modules)
  • Portal Mode preserves React state, cursor, and focus perfectly
  • Auto-sizing via ResizeObserver (no hardcoded dimensions)
  • Graceful fallbacks for Firefox/Safari

Live demos include a floating Monaco editor that keeps your cursor focus while you switch to your IDE.

GitHub (MIT): https://github.com/Shakya47/pip-it-up
npm: https://www.npmjs.com/package/@pip-it-up/react

Browser API: https://developer.mozilla.org/en-US/docs/Web/API/Document_Picture-in-Picture_API

Would love feedbacks.

u/shakya47 — 18 hours ago

Life Insurance - Commission - Bima lokpal Scam

I have a HDFC life term insurance.
S(n) - scammer 1
Me - Myself
-------------------------------------------------------------------------------
Day 1:
S1: "Hello, this is HDFC Life Insurance RM, are you getting proper service from your agent regarding your insurance"
Me: "No, I never get a call from my agent, I didn't even know that I had an agent"
S1: "Sir in your policy it states that agent is taking 27% commission for the service. But as he's not providing it, it falls under mis-selling. I can raise a complaint with Bima Lokpal" Then she went on and on about IRDIA acts.
Me: "Okay"
S1: "As per the 27% commission, you should get the refund back after the complaint resolution"

Day 2:
S2: "This is from Bima Lokpal office, we got your complaint and our officer will go through your case and let you know the resolution later"
Me: "Okay"

Day 3:
S2: "We have issued warning to the HDFC Branch and terminated the agent from your policy.
If the branch gets 3 warning, the branch would be terminated. We have 3 resolutions: Continue with Policy as-is, Go with new agent with the same commission and last do a Fund Transfer Policy(FTP) in which my term policy will be transferred to a new policy and I get my money back (+8% interest) after 13 months. I just have to pay 1 year premium"
Me: "I need some time"

Day 4:
S1: "Bima lokpal has provided with 3 resolutions. The FTP one is the most reasonable one"
Me: "I need some time to think"

Day 5:
S3: "I'm calling from the office of S2. Please let us know your option other wise we'll have to close the complaint"
Me: "Don't close, I need some time to compare my policy document"
S3: "Sir the 27% commission is written in your agreement, we cannot change that otherwise the policy would be terminated and 27% is way too much. It should be around 4-5%. Best option would be the FTP."
Me: "Okay I'll let you know"
-------------------------------------------------------------------------------

My doubts:

  1. I never purchased the policy through an agent
  2. Its a term insurance, why would there be an interest in it?
  3. How come the Bima lokpal be so active that they even call me twice a day?

They are clever in giving me space, options, not rushing while talking.

I called HDFC Life Insurance helpline and found out that there is no such thing as Fund or Policy transfer in my policy. They confirmed it was a scam.

These guys are very sophisticated. Beware

reddit.com
u/shakya47 — 12 days ago
▲ 0 r/LifeInsurance+1 crossposts

I have a HDFC life term insurance.
S(n) - scammer 1
Me - Myself
-------------------------------------------------------------------------------
Day 1:
S1: "Hello, this is HDFC Life Insurance RM, are you getting proper service from your agent regarding your insurance"
Me: "No, I never get a call from my agent, I didn't even know that I had an agent"
S1: "Sir in your policy it states that agent is taking 27% commission for the service. But as he's not providing it, it falls under mis-selling. I can raise a complaint with Bima Lokpal" Then she went on and on about IRDIA acts.
Me: "Okay"
S1: "As per the 27% commission, you should get the refund back after the complaint resolution"

Day 2:
S2: "This is from Bima Lokpal office, we got your complaint and our officer will go through your case and let you know the resolution later"
Me: "Okay"

Day 3:
S2: "We have issued warning to the HDFC Branch and terminated the agent from your policy.
If the branch gets 3 warning, the branch would be terminated. We have 3 resolutions: Continue with Policy as-is, Go with new agent with the same commission and last do a Fund Transfer Policy(FTP) in which my term policy will be transferred to a new policy and I get my money back (+8% interest) after 13 months. I just have to pay 1 year premium"
Me: "I need some time"

Day 4:
S1: "Bima lokpal has provided with 3 resolutions. The FTP one is the most reasonable one"
Me: "I need some time to think"

Day 5:
S3: "I'm calling from the office of S2. Please let us know your option other wise we'll have to close the complaint"
Me: "Don't close, I need some time to compare my policy document"
S3: "Sir the 27% commission is written in your agreement, we cannot change that otherwise the policy would be terminated and 27% is way too much. It should be around 4-5%. Best option would be the FTP."
Me: "Okay I'll let you know"
-------------------------------------------------------------------------------

My doubts:

  1. I never purchased the policy through an agent
  2. Its a term insurance, why would there be an interest in it?
  3. How come the Bima lokpal be so active that they even call me twice a day?

They are clever in giving me space, options, not rushing while talking.

I called HDFC Life Insurance helpline and found out that there is no such thing as Fund or Policy transfer in my policy. They confirmed it was a scam.

These guys are very sophisticated. Beware

reddit.com
u/shakya47 — 12 days ago