Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIMESTAMP_IN_TIMEBAR does not work. #694

Open
jp-rad opened this issue Jan 12, 2023 · 7 comments
Open

TIMESTAMP_IN_TIMEBAR does not work. #694

jp-rad opened this issue Jan 12, 2023 · 7 comments
Assignees
Labels
bug Something isn't working frontend Frontend issues help wanted Extra attention is needed

Comments

@jp-rad
Copy link

jp-rad commented Jan 12, 2023

Describe the issue
A clear and concise description of what the issue is.

To Reproduce

  1. TIMESTAMP_IN_TIMEBAR = True # shows timestamped comments in the timebar for videos
  2. Add a comment, 'mm:ssorhh:mm:ss`
  3. Comment without timestamped

Expected behavior

  1. shows timestamped comments in the timebar for videos
jp-rad pushed a commit to jp-rad/mediacms-protected that referenced this issue Jan 13, 2023
…rs after the canplay event

v1.9 - 7.20.2 video.js (L.L.27087-27124)

Timestamp URL shortcut does not work
mediacms-io#680

TIMESTAMP_IN_TIMEBAR does not work
mediacms-io#694
@mgogoulos
Copy link
Contributor

it seems that timestamp has broken after video.js upgrade - #519

trying to fix, any help is appreciated!

@mgogoulos mgogoulos added frontend Frontend issues backend Backend issues bug Something isn't working help wanted Extra attention is needed and removed backend Backend issues labels Jan 25, 2023
@jp-rad
Copy link
Author

jp-rad commented Jan 27, 2023

I will try.

@mgogoulos
Copy link
Contributor

To give more insight here, the video.js upgrade on #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

@jp-rad
Copy link
Author

jp-rad commented Jan 30, 2023

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

@jp-rad
Copy link
Author

jp-rad commented Jan 30, 2023

setTimestampAnchorsAndMarkers() is only called on the loadedmetadata event, so adding or removing comments during video playback will not change the timebar markers.

https://github.com/mediacms-io/mediacms/blob/main/frontend/src/static/js/components/comments/Comments.jsx#L447

@mgogoulos
Copy link
Contributor

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

@jp-rad
Copy link
Author

jp-rad commented Jan 30, 2023

Pull Requested, #706
However, there is a problem with the following: the comment does not appear on the video.

  1. upload videos
  2. Add a timed comment to each video
  3. When one video is played, comments appear on the video according to the timeline
  4. Clicking on the Up next video will play the next video and display comments on the video
  5. Pause video
  6. Clicking on the Up next video
  7. so the next video will play, but no comments will appear on the video.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Frontend issues help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants