Open YouTube player

Getting Started

Introduction

Welcome to the YouTube Player documentation. You may find a lot of answers for your questions here.
Still problems? Feel free to contact me on discord (Yazaar#1779) or twitch.

Videos

Video Search

Find the big search box and treat it like an official YouTube search box. Click search and wait for videos to appear.
Not working? Try to swap API key.

View Playlist

Find your YouTube playlist URL which is public. Paste it into the big search box and click the "Search Playlist" button.
Not working? Try to swap API key.

example URL: https://www.youtube.com/playlist?list=PLYH8WvNV1YEnblnazwa6y27kkeqg35dfz

Add By URL

Find your YouTube video URL which is public. Paste it into the big search box and click the "Find Video" button.
Works without API key!

example URL: https://www.youtube.com/watch?v=-g7yAXPuu6A

Google API

Information

The search box is powered by the google API which means that a key is required. Each key has a limited amount of "points" which you as an user may use each day. This leads to problems if a large amount of people are using the website. The official key runs out of "points" or "quotas" as it is called. Use your private key to decrease your limitations.
Songrequests and searching for a specific video through a URL works without the API key! But it will try to use the key for an extended amount of data.

Swap Key

    YouTube video guide (not by me)
  1. Open up the google console and login to your google account.
  2. Click "Select a project" which can be found top left.
  3. A window should pop up with the button "NEW PROJECT" located top right, click it.
  4. Feel free to swap the project name but this is not required. Skip location and click the blue "CREATE" button.
  5. Make sure that the notifications pops up, or click on the bell located top right. Wait for your project to be created. You might have to reopen the notifications to notice that it is finished!
  6. When finished, click on the created project. Wait for the page to load and open up the navigation menu (found top left).
  7. Hover over "APIs & Services" and click on "Dashboard".
  8. Find the blue text "+ ENABLE APIS AND SERVICES" and click it.
  9. In the white searchbox "Search for APIs & Services" search for YouTube.
  10. Click on the box "YouTube Data API v3"
  11. Click on the blue box "ENABLE".
  12. Open up the navigation menu, hover over "APIs & Services" and click on "Cridentials".
  13. Click the blue button "create cridentials" and then on "API key"
  14. Copy your key which should pop up and click close (feel free to restrict your key but this is not required).
  15. Save the API key somewhere, nobody can use your key to gain personal information but keep it safe from others to save your quotas/points.

Songrequest

Usage

Are you a broadcaster on twitch? If so, feel free to connect the YouTube player to your twitch chat to enable video-requests! Everyone in your chat are able to request a limited amount of videos which is configurable. The caster and moderators are able to request any amount of videos.

Warning, users are able to request anything from the YouTube platform!

Setup

  1. Open up the YouTube player.
  2. Click on the button "Toggle songrequest"
  3. Click "Get TMI" and connect with Twitch.
    Keep the TMI secret and generate a new one through "Get TMI" if exposed, people may use the TMI and type in your twitch chat through YOUR ACCOUNT which gives them broadcaster rights!
  4. Copy the oauth and paste it into the TMI passwordbox on the player.
  5. Type in your twitch user account in textbox 2.
  6. Type in the channel that you would like to listen on, usually your own twitch username.
  7. Click on the "CONNECT" button. Should be in your channel to listen on the command found underneath
  8. Feel free to change the command by typing in the command textbox
  9. Feel free to change the request limit per user through the numberfield. Mods and casters are not included.

Commands

Socket

Usage

Would you like to forward what is currently playing to a third part source? If so connect, it through a websocket (socketIO) connection. This can be used to create overlays and much more. The website is automatically going to forward over what is currently playing and some other useful details.
This was built for my own software called LocalStreamElements to enable a stream overlay, feel free to use it to host a local websocket with ease.

Setup

  1. Open up the YouTube player.
  2. Click the button "Toggle socket".
  3. 2 input fields should appear:
    The first one should be the target. If your websocket connection is hosted on the current machine you can leave it as localhost. Else, insert the local ip address to your machine which is hosting the socket. (windows users: open up cmd which is a program on all machines, type ipconfig and check for your IPv4 Address)
    The second one should be a number which represents the port that the websocket is running on. The standard is port 80 but it differs on configuration.
    http://192.168.1.50:5000 (192.168.1.50 = host and 5000 = port)
  4. Your socketIO server should listen to the event ScriptTalk and it takes 1 argument which contains all of the data. If you are using my software LocalStreamElements, listen on the event called p-Yazaar_YouTube_Analyzer:Changes
  5. code examples!

Overlay

Usage

Are you a streamer? If so, feel free to use the overlay functionality to show your viewers what is currently playing.

Setup

  1. Open up the YouTube player.
  2. Click the button "Toggle overlay".
  3. The overlay should pop up and you unlock the possibility to change the overlay settings as well as using a few settings presets. I would personally recommend number 1.