Posts

Showing posts from January, 2018

EXAMPLE ON MODIFYING HTML5 MEDIAELEMENT.JS PLAYER

Image
Creating a video player using HTML5 is not too difficult. But it only plays some video formats such as MP4, OGG, WEBM. To watch more video formats, we must use the HTML5 video player plugin. I tried "Mediaelement.js" and found it great: in addition to the above mentioned formats, it can play YouTube, DaylyMotion, SoundCloud, Facebook, Vimeo, HLS, Dash, FLV and others. In the samples by "Mediaelement.js" I choose only two examples close to satisfy my needs. However in the sample for playlist, the player only plays mp4, mp3, ogg, webm and youtube. Meanwhile, the demo file can play a lot of formats but only play 1 video (when it is clicked) and stops. All the scripts are very short. Most just include only one function with multiple arguments to build the player. Nothing more. So I looked at the source code of the "mediaelement-js.com" page, where all js files are online and have more functions. However, it is very difficult for me