Skip to content

Instantly share code, notes, and snippets.

@thangman22
Created December 28, 2024 15:22
Show Gist options
  • Save thangman22/3289fed2ff3a7675017a0ee972fa43a1 to your computer and use it in GitHub Desktop.
Save thangman22/3289fed2ff3a7675017a0ee972fa43a1 to your computer and use it in GitHub Desktop.
pipButton.addEventListener('click', async () => {
const chatScreen = document.querySelector("#chat-screen");
// Open a Picture-in-Picture window.
const pipWindow = await documentPictureInPicture.requestWindow();
// Move the player to the Picture-in-Picture window.
pipWindow.document.body.append(chatScreen);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment