inline-player.mdx 892 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. title: Inline player
  3. libs: plyr
  4. description: A simple, lightweight, accessible and customizable HTML5, YouTube and Vimeo media player that supports modern browsers.
  5. ---
  6. ## Sample demo
  7. ```html example code vendors height="500px"
  8. <div id="player-youtube" data-plyr-provider="youtube" data-plyr-embed-id="dQw4w9WgXcQ"></div>
  9. <script src="$TABLER_CDN/dist/libs/plyr/dist/plyr.min.js"></script>
  10. <script>
  11. document.addEventListener("DOMContentLoaded", function() {
  12. window.Plyr && (new Plyr('#player-youtube'));
  13. });
  14. </script>
  15. ```
  16. ## Vimeo file
  17. ```html example code vendors height="500px"
  18. <div id="player-vimeo" data-plyr-provider="vimeo" data-plyr-embed-id="515937365"></div>
  19. <script src="$TABLER_CDN/dist/libs/plyr/dist/plyr.min.js"></script>
  20. <script>
  21. document.addEventListener("DOMContentLoaded", function() {
  22. window.Plyr && (new Plyr('#player-vimeo'));
  23. });
  24. </script>
  25. ```