videojs-markers
videojs-markers copied to clipboard
TypeError: Cannot read property 'time' of undefined
This appears in the js console the moment the video ends playback for the first time using videojs 5. Restarting the video again makes these messages accumulate on a continuous basis. Full output in the console (Chrome):
Uncaught TypeError: Cannot read property 'time' of undefined in videojs-markers.min.js:3
I'll take a look. Thanks for reporting :)
fixed it in commit 702727
Thank you!
Hmmm... After updating to your latest commit it seems this problem still persists.
Can you show me an example code so I can repro?
Sent from my iPhone
On Nov 4, 2015, at 2:51 AM, Michael Dzjaparidze [email protected] wrote:
Hmmm... After updating to your latest commit it seems this problem still persists.
― Reply to this email directly or view it on GitHub.
I am getting this same error if I use
markers: [ {time: 0} ]
I am getting this same error if I use below. I personally want to start with no markers.
markers: [ ]
No error with this
markers: [ {time: 1} ]
No error with this
markers: [ {time: 0},{time: 1} ]
Facing the same problem, getting that error on console every second after re-playing de video
markers: [ {time: 2, text: "Marker text"} ]
Hi all!
Is this bug fixed?
Cause I'm facing the same problem: When the video reaches the end at the first time, the errors below are throw to console:
I've already double checked and no mark is crossing the video duration.
I would appreciate if someone could share a fix or workaround.
Thanks! :+1:
videojs-markers version: videojs-markers - v0.5.0 - 2015-08-01
Hi guys, sorry to get back so late. I can't seem to reproduce the problem when replaying video.
Can you try it with the latest commit? If the problem still exists, it'll be great if you can provide a short demo that repros the issue! Thanks
Still facing the same error on console after replaying the video with the lastest commit:
VIDEOJS: ERROR: TypeError: Cannot read property 'time' of undefined(…)
@ video.js:6359
f.apply?f[Array.isArray(b)?"apply":"call"](d,b):f(b)};c.logByType=i,/**
@marianoarga can you show me the code so I can try to repro?
Does anyone found a fix (or at least a workaround) for this problem. I don't see a pattern on this error, happening with some cases. Thanks!
@spchuang I think I found the error pattern: Here, in my project (which unfortunately I can't share any code), the error happens every time the last marker doesn't come after the video duration. When the last marker has it's time set to after total video duration, the error doesn't happen.
Please consider that I'm creating my markers in a crescent order of times.
So, for example: Video duration = 60s
Last marker time = 55s -> The error happens Last marker time = 65s -> The error doesn't happens
@mauricioklein it makes sense that you can't share any real code :) But can you create a small and simple demo that reproduces the issue for me? So I can debug and fix it?
@spchuang I'll try to do so in a JSBin, but I'm not sure if I'll be able to reproduce the error. I'll let you know.
Anyway, I'm now putting an extra marker on my setup, with time = Number.MAX_SAFE_INTEGER
, which will be always greater than the video duration, and the error is gone.
Just to clarify: I'm intercepting the markers with the onMarkerReached
callback.
Thanks!