var videoinfo = [{
"startdatetime":"2014-12-21 00:23:14",
"totalsecondrun":"5",
"videolist":[
{
"videoid":"uoSDF234",
"second":"10"
},
{
"videoid":"0apq3ss",
"second":"14"
}
]
}];
I need a function to calculate current video and second, but so far I don't have any idea how to start.
- use
totalsecondrunto find currently playing which video - base on
totalsecondrunis between which video now. - exmaple:
totalsecondrun:"5",5so should be the first video, function returnvideoidandsecond(totalsecondrun:"5"- first videosecond= video stoppedsecond) - example:
totalsecondrun:"12",12is more than first video, so now it should be second video, so function returnvideoidandsecondtoo.
Anyone can suggest me what should I do ?