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:
parent
d38634df8d
commit
6996894ec1
6 changed files with 32 additions and 5 deletions
1
static/css/plyr.css
Normal file
1
static/css/plyr.css
Normal file
File diff suppressed because one or more lines are too long
|
@ -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
1
static/js/plyr.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue