brightcove / videojs-thumbnails

A video.js plugin that displays thumbnail images over the scrubber.
Other
168 stars 97 forks source link

How to assign different sprited images to thumbnails #29

Open AlapArslan opened 9 years ago

AlapArslan commented 9 years ago

i am using 628 second video and convert it to sprite of 10x10. it makes 2 images file M0.jpg , M1.jpg i want to show each sprite for five second and now there are two problems.

1.it works fine for M0.jpg but it does'nt work for M1.jpg.How can we give the src of M1.jpg so that it works fine for next 128 seonds? 2.if we have video which length is 1000 seconds then how we change this code automatically for this video or every length of video? video.thumbnails({ 0:{src: 'M0.jpg',style: {left: '-40px',width: '800px',height: '450px',top: '-60px',clip: 'rect(0, 80px, 45px, 0px)'}}, 5:{src: 'M0.jpg',style: {left: '-120px',width: '800px',height: '450px',top: '-60px',clip: 'rect(0, 160px, 45px, 80px)'}}, 10:{src: 'M0.jpg',style: {left: '-200px',width: '800px',height: '450px',top: '-60px',clip: 'rect(0, 240px, 45px, 160px)'}}, 15:{src: 'M0.jpg',style: {left: '-280px',width: '800px',height: '450px',top: '-60px',clip: 'rect(0, 320px, 45px, 240px)'}}, . . 500:{src: 'M1.jpg',style: {left: '-40px',width: '800px',height: '135px',top: '-60px',clip: 'rect(0, 80px, 45px, 0px)'}}, 505:{src: 'M1.jpg',style: {left: '-120px',width: '800px',height: '135px',top: '-60px',clip: 'rect(0, 160px, 45px, 80px)'}}, . . 625:{src: 'M1.jpg',style: {left: '-440px',width: '800px',height: '135px',top: '-150px',clip: 'rect(90px, 480px, 135px, 400px)'}}, 630:{src: 'M1.jpg',style: {left: '-520px',width: '800px',height: '135px',top: '-150px',clip: 'rect(90px, 560px, 135px, 480px)'}}});