An open API service indexing awesome lists of open source software.

https://github.com/dalascript/picture-in-picture

ZTM JS Web Projects Course | Picture in Picture | Project 3/20
https://github.com/dalascript/picture-in-picture

css html js picture-in-picture screen-capture-api zerotomastery

Last synced: 3 months ago
JSON representation

ZTM JS Web Projects Course | Picture in Picture | Project 3/20

Awesome Lists containing this project

README

          

# Picture in Picture | ZTM JS Web Projects Course

**Project 3/20**

A minimalist Picture-in-Picture (PiP) web app that allows users to share their screen and pop it out into a floating video window using the browser's native Picture-in-Picture API. Clean design, one-click interaction, and a focused learning experience on media APIs.

---

## šŸ“š Table of Contents

- [šŸ”Ž Overview](#-overview)
- [šŸ“ø Screenshot](#-screenshot)
- [šŸ”— Links](#-links)
- [šŸ“Œ Features](#-features)
- [🧠 My process](#-my-process)
- [šŸ› ļø Built with](#ļø-built-with)
- [šŸŽ“ What I learned](#-what-i-learned)
- [šŸ”™ Previous Project](#-previous-project)
- [šŸ”œ Next Project](#-next-project)
- [šŸ—ƒļø Useful resources](#ļø-useful-resources)
- [šŸ‘¤ Author](#-author)
- [🌐 Connect with Me](#-connect-with-me)
- [šŸ’» Coding Profiles](#-coding-profiles)

---

## šŸ”Ž Overview

### šŸ“ø Screenshot

![Live Preview Screenshot](./assets/screenshot.jpg)

### šŸ”— Links

- [šŸ”“ Live Demo](https://dalascript.github.io/picture-in-picture/)
- [šŸ—‚ļø GitHub Repository](https://github.com/DalaScript/picture-in-picture)

### šŸ“Œ Features

- āœ… Prompts the user to select a screen to share
- āœ… Streams the selected screen into a hidden video element
- āœ… Allows starting Picture-in-Picture with a single click

---

## 🧠 My Process

### šŸ› ļø Built with

- HTML5
- CSS3
- Vanilla JavaScript
- Picture-in-Picture Web API
- MediaDevices API (`getDisplayMedia()`)

### šŸŽ“ What I Learned

- How to work with `getDisplayMedia()` to capture the screen
- Implementing and controlling Picture-in-Picture mode via JavaScript
- Managing DOM elements and user interaction state (e.g., disabling button while PiP is active)
- Creating clean UI with shadows, gradients, and responsive centering

> šŸš€ For me, this project was more about **practice** and gaining additional **experience**,
> rather than learning something entirely new.
>
> šŸ‘Øā€šŸ’» Since I’m not a beginner and already familiar with these technologies,
> I approached it with confidence — and still, I truly **enjoyed working on it**.
>
> šŸŽÆ Overall, I consider this a very **valuable and enjoyable experience**.

### šŸ”™ Previous Project

- Infinite Scroll | *[Project 2/20]* → [View Repository](https://github.com/DalaScript/infinite-scroll)

### šŸ”œ Next Project

- Joke Teller | *[Project 4/20]* → [View Repository](https://github.com/DalaScript/joke-teller)

### šŸ—ƒļø Useful resources

- [Google Fonts](https://fonts.google.com/) – Source for beautiful and free web fonts used in your UI.
- [CSS Tricks - Picture-in-Picture Guide](https://css-tricks.com/an-introduction-to-the-picture-in-picture-web-api/) – Great overview and code snippets for working with the PiP Web API.
- [MDN - Screen Capture API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture) – In-depth guide on using `getDisplayMedia()` for screen sharing.
- [TC39](https://github.com/tc39/proposals) – The list of JavaScript language feature proposals

---

## šŸ‘¤ Author

### 🌐 Connect with Me

- [Instagram](https://www.instagram.com/DalaScript)
- [YouTube](https://www.youtube.com/@DalaScript)

### šŸ’» Coding Profiles

- [freeCodeCamp](https://www.freecodecamp.org/DalaScript)
- [FrontendMentor](https://www.frontendmentor.io/profile/DalaScript)
- [GitHub](https://github.com/DalaScript)

*šŸ™Œ Thanks for checking out my project! More coming soon. Stay tuned šŸš€*