I’m trying to have several video players appear onto a web page and load their video, as efficiently(fast) as possible.
I’m interested to learn if this code can be improved for quicker loading? (Or any other ideas on how make several small video players be available on a single web page). Here’s the code I’m currently using:
<script type="text/javascript">
$(document).ready(function() {
var tn1 = $('.tn3gallery').tn3({
width: 125,
height: 120,
autoplay: false,
image:{
crop:true,
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress', 'playpause']
}
}],
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery1').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause','progress', 'playpause']
}
}],
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery2').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress', 'playpause']
}
}]
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery3').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress', 'playpause']
}
}]
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery4').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress', 'playpause']
}
}]
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery5').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress','playpause' ]
}
}]
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery6').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress','playpause' ]
}
}]
});
});
$(document).ready(function() {
var tn1 = $('.tn3gallery7').tn3({
width: 125,
height: 120,
autoplay:false,
image:{
crop:true
},
content:[{
plugin: "mediaelement",
options: {
features: ['playpause', 'progress', 'playpause']
}
}]
});
});
</script>