create video playlist using jquery
function handler(e) {
e.preventDefault();
videotarget = this.getAttribute("href");
filename = videotarget.substr(0, videotarget.lastIndexOf('.')) || videotarget;
video = document.querySelector("#video_player video");
video.removeAttribute("controls");
video.removeAttribute("poster");
source = document.querySelectorAll("#video_player video source");
source[0].src = filename + ".mp4";
source[1].src = filename + ".webm";
video.load();
video.play();
}
Also in JavaScript:
- how to control where the text cursor on div
- laravel pass collection to javascript
- nodejs format text
- json file for questions
- $(this).text() in jquery return white space
- class in react
- node js find directory change directory
- we need a server for server side rendering of angular
- javascript remove css link
- async await anonymous function
- angular pipe multiple arguments
- what is a dictionary in programming
- json arrays
- close browser tab using jquery
- change select value jquery
- flutter regular expression for arabic and english characters
- using server passed values and client js together in ejs
- how to wait for an exec command to fininsh in nodejs
- add new items in a select input using js
- javascript array add
- toast notification angular bootstrap 8
- es6 array to object keys
- how to execute javascript after c# function execute
- conditional props react