Skip to content

Commit

Permalink
Change the loadedmetadata event to the canplaythrough event that occu…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
jp-rad committed Jan 13, 2023
1 parent 0b7f2bd commit 2c87b16
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ Open in browser: [http://localhost:8088](http://localhost:8088)
Generates the folder "**_frontend/dist_**".

Copy folders and files from "**_frontend/dist/static_**" into "**_static_**".

cp -rf /home/mediacms.io/mediacms/frontend/dist/static /home/mediacms.io/mediacms/
2 changes: 1 addition & 1 deletion frontend/src/static/js/components/comments/Comments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ export default function CommentsList(props) {
});
}

video.one('loadedmetadata', () => {
video.one('canplay', () => {
retrievedComments.forEach(comment => {
comment.text = setTimestampAnchorsAndMarkers(comment.text, video);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function VideoPlayer(props) {
document.addEventListener('visibilitychange', initPlayer);
}

player.player.one('loadedmetadata', () => {
player.player.one('canplaythrough', () => {
const urlParams = new URLSearchParams(window.location.search);
const paramT = Number(urlParams.get('t'));
const timestamp = !isNaN(paramT) ? paramT : 0;
Expand Down
2 changes: 1 addition & 1 deletion static/js/_commons.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/embed.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/media.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/playlist.js

Large diffs are not rendered by default.

0 comments on commit 2c87b16

Please sign in to comment.