Last active
November 10, 2021 16:30
-
-
Save io-st/2afdf78efb48f9315682ed5d3fb3bf1e to your computer and use it in GitHub Desktop.
Einfaches Beispiel: YouTube im plyr.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdn.plyr.io/3.6.9/plyr.css" rel="stylesheet" /> | |
<link href="style.css" rel="stylesheet" /> | |
<script src="https://cdn.polyfill.io/v3/polyfill.js?features=es6,Array.prototype.includes,CustomEvent,Object.entries,Object.values,URL"></script> | |
<script src="https://cdn.plyr.io/3.6.9/plyr.js"></script> | |
<!-- script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hls.min.js"></script --> | |
<!-- script src="https://vdo.cy/cdnjs/plyr-hls.js"></script --> | |
<script src="plyr.js"></script> | |
<div class="container"> | |
<div id="player" data-plyr-provider="youtube" data-plyr-embed-id="bTqVqk7FSmY"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change "{}" to your options: | |
// https://github.com/sampotts/plyr/#options | |
const player = new Plyr('#player', {}); | |
// Expose player so it can be used from the console | |
window.player = player; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
margin: 20px auto; | |
max-width: 500px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment