javascript - Video.js Simple function Failing -


this seems should super simple function, reason currentframe(canv2); returns 'undefined'

i have many more complex functions using same elements this, , work.

var framerate = 30;  var players=new array(_v_("video_canvas_1"), _v_("video_canvas_2"));  var canv1 = players[0]; var canv2 = players[1];  function currentframe(e) {     framerate * e.currenttime(); } 

update wrote value console, , of course works great:

function currentframe(e) {     framerate * e.currenttime();     console.log('currenttime * framerate:' + framerate * e.currenttime()); } 

returns

currenttime * framerate:102.09498167037964 main.js:45 currenttime * framerate:102.09498167037964 main.js:45 currenttime * framerate:102.09498167037964 main.js:45 

it looks may need

function currentframe(e) {     return framerate * e.currenttime(); } 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -