Mediaelement YouTube Embed Player Integration

 Mediaelement YouTube Embed Player Integration


Firstly Check This Things :-


See Demo :- https://repl.it/@SH20RAJ/mediaelement#youtube-embed.html


Steps To Integrate :- 

1. Add src in <video/> Tag


 

<video width="640" height="360">
	<source src="https://www.youtube.com/watch?v=RroiPxzCYac" type="video/youtube">
</video>
    

2. Add Css CDN.


  
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.6/mediaelementplayer.css"/>
    

3. Add JavaScript CDN.


And it's done now.

    
	<script src="https://cdn.jsdelivr.net/gh/CDNSFree2/Mediaelements.js@main/mediaelements.js"></script>
    


See Demo Here :-


Tips :-

 
You can also add a poster attribute to show another image
example :-


poster="https://images.unsplash.com/photo-1611095968462-3dc56b14454a?ixid=MXwxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=751&q=80"


CXDI Demo :- https://codexd-india.blogspot.com/2021/03/mediaelement-youtube-embed-player.html


Download Files for working offline :- https://github.com/INDIECDN/mediaelement




Comments