Open jp-rad opened 1 year ago
it seems that timestamp has broken after video.js upgrade - https://github.com/mediacms-io/mediacms/pull/519
trying to fix, any help is appreciated!
I will try.
To give more insight here, the video.js upgrade on https://github.com/mediacms-io/mediacms/pull/519 made this feature break, and it's strange how a video.js (an external library) could trigger this issue. When you specify timestamp on the URL and start a video, you see that it starts on the correct time but immediately after that it starts from the beginning of the video, as sure as a function is triggered that does this
setTimestampAnchorsAndMarkers()
and initialize()
are called on the loadedmetadata
event, and thus the order of their execution is undefined.
setTimestampAnchorsAndMarkers()
https://github.com/mediacms-io/mediacms/blob/main/frontend/src/static/js/components/comments/Comments.jsx#L447
initialize()
https://github.com/mediacms-io/mediacms/blob/main/frontend/src/static/js/components/comments/videojs-markers.js#L454
setTimestampAnchorsAndMarkers()
is only called on the loadedmetadata
event, so adding or removing comments during video playback will not change the timebar markers.
I think the problem is related with the video player doing something wrong, so not necessarily related with comments, I guess it's something on frontend/src/static/js/components/video-player/VideoPlayer.jsx
Pull Requested, https://github.com/mediacms-io/mediacms/pull/706 However, there is a problem with the following: the comment does not appear on the video.
Up next
video will play the next video and display comments on the videoUp next
video
Describe the issue A clear and concise description of what the issue is.
To Reproduce
or
hh:mm:ss`Expected behavior