shobhitsharma / embedo

Embeds third party content to DOM with perks 🧙‍♀️ (7kb gzip / standalone)
https://shobhitsharma.github.io/embedo
MIT License
347 stars 32 forks source link

Youtube allow fullscreen #28

Closed lineke closed 3 years ago

lineke commented 3 years ago

Is it possible to enable the fullscreen button in youtube embedded video's? Since it does not seem to be possible according to the code, if I read it correctly.

shobhitsharma commented 3 years ago

@lineke Moin Moin. You can pass options as arguments in .load() function, see example here. It supports anything that youtube supports.

  embedo.load(
    document.getElementById('test-container'),
    'https://www.youtube.com/watch?v=RLWcYADoV84',
    { allowfullscreen: true, autoplay: true }
  );

https://codepen.io/shobhitsharma/pen/gOLOYWP