Nuclear Planning Manual

    openplayerjs-youtube

    2.2.0 • Public • Published

    openplayer

    OpenPlayer.js - YouTube

    NPM
    JSDelivr Conventional Commits

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

    Installation

    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á!

    Configuration

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

    Example

    <!DOCTYPE html>
    <html lang="en">
    <body>
        <video class="op-player__media" id="video" controls playsinline>
            <source src="https://www.youtube.com/watch?v=xcJtL7QggTI" type="video/x-youtube">
        </video>
        <script src="https://cdn.jsdelivr.net/npm/openplayerjs@latest/dist/openplayer.min.js"></script>
        <script src="/path/to/openplayerjs-youtube.min.js"></script>
        <script>
            var player = new OpenPlayer('video', {
                youtube: {
                    // config
                }
            });
            player.init();
        </script>
    </body>
    </html>

    Install

    npm i openplayerjs-youtube

    DownloadsWeekly Downloads

    34

    Version

    2.2.0

    License

    MIT

    Unpacked Size

    52.5 kB

    Total Files

    11

    Last publish

    Collaborators

    • rafa8626