Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including openplayerjs-youtube with all npm packages installed. Try it out:

var openplayerjsYoutube = require("openplayerjs-youtube")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

openplayerjs-youtube v1.1.1

OpenPlayer extension to play YouTube videos


OpenPlayer.js - YouTube

JSDelivr Conventional Commits

Now you can play any YouTube videos using the awesome OpenPlayerJS!


  1. Set the video/audio as indicated in the OpenPlayerJS installation.
  2. Set the type of your source as video/x-youtube.
  3. Load this package library right after OpenPlayerJS.
  4. And voilá!


It allows you to override YouTube's configuration by using the youtube object in the settings. Check Supported parameters section for more details.


<!DOCTYPE html>
<html lang="en">
    <video class="op-player__media" id="video" controls playsinline>
        <source src="" type="video/x-youtube">
    <script src=""></script>
    <script src="/path/to/openplayerjs-youtube.min.js"></script>
        var player = new OpenPlayer('video', null, false, {
            youtube: {
                // config


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free