add video shortcode (#289)

* add video shortcode

* Use "sampotts/plyr" library instead of "clappr/clappr"

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
David G. Simmons 2021-04-05 15:12:28 -04:00 committed by GitHub
parent d38634df8d
commit 6996894ec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 5 deletions

1
static/css/plyr.css Normal file

File diff suppressed because one or more lines are too long

View file

@ -72,6 +72,16 @@ var isMobile = false, isTablet = false, isLaptop = false;
}
addSmoothScroll();
// ===================== Video Player ==================
function renderVideoPlayer(){
var videos = document.getElementsByClassName("video-player");
for (var i =0; i< videos.length; i++ ){
const player = new Plyr("#"+videos[i].id);
}
}
renderVideoPlayer();
// re-render custom functions on window resize
window.onresize = function () {
detectDevice();

1
static/js/plyr.js Normal file

File diff suppressed because one or more lines are too long