mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-06 23:48:54 -05:00
parent
c866fdd6ba
commit
102414b514
@ -430,29 +430,35 @@ export default function CommentsList(props) {
|
|||||||
|
|
||||||
function onCommentsLoad() {
|
function onCommentsLoad() {
|
||||||
const retrievedComments = [...MediaPageStore.get('media-comments')];
|
const retrievedComments = [...MediaPageStore.get('media-comments')];
|
||||||
const video = videojs('vjs_video_3');
|
|
||||||
|
|
||||||
if (MediaCMS.features.media.actions.timestampTimebar)
|
|
||||||
{
|
|
||||||
enableMarkers(video);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (MediaCMS.features.media.actions.comment_mention === true)
|
|
||||||
{
|
|
||||||
retrievedComments.forEach(comment => {
|
|
||||||
comment.text = setMentions(comment.text);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
video.one('loadedmetadata', () => {
|
|
||||||
retrievedComments.forEach(comment => {
|
|
||||||
comment.text = setTimestampAnchorsAndMarkers(comment.text, video);
|
|
||||||
});
|
|
||||||
|
|
||||||
displayCommentsRelatedAlert();
|
|
||||||
setComments([...retrievedComments]);
|
|
||||||
});
|
|
||||||
setComments([...retrievedComments]);
|
setComments([...retrievedComments]);
|
||||||
|
|
||||||
|
// TODO: this code is breaking, beed ti debug, until then removing the extra
|
||||||
|
// functionality related with video/timestamp/user mentions
|
||||||
|
// const video = videojs('vjs_video_3');
|
||||||
|
|
||||||
|
// if (MediaCMS.features.media.actions.timestampTimebar)
|
||||||
|
//{
|
||||||
|
// enableMarkers(video);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//if (MediaCMS.features.media.actions.comment_mention === true)
|
||||||
|
//{
|
||||||
|
// retrievedComments.forEach(comment => {
|
||||||
|
// comment.text = setMentions(comment.text);
|
||||||
|
// });
|
||||||
|
//}
|
||||||
|
|
||||||
|
// TODO: this code is breaking
|
||||||
|
// video.one('loadedmetadata', () => {
|
||||||
|
// retrievedComments.forEach(comment => {
|
||||||
|
// comment.text = setTimestampAnchorsAndMarkers(comment.text, video);
|
||||||
|
// });
|
||||||
|
|
||||||
|
// displayCommentsRelatedAlert();
|
||||||
|
// setComments([...retrievedComments]);
|
||||||
|
//});
|
||||||
|
//setComments([...retrievedComments]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setMentions(text)
|
function setMentions(text)
|
||||||
|
|||||||
@ -194,7 +194,9 @@ class MediaPageStore extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.loadPlaylists();
|
this.loadPlaylists();
|
||||||
|
if (MediaCMS.features.media.actions.comment_mention === true) {
|
||||||
this.loadUsers();
|
this.loadUsers();
|
||||||
|
}
|
||||||
|
|
||||||
if (this.mediacms_config.member.can.readComment) {
|
if (this.mediacms_config.member.can.readComment) {
|
||||||
this.loadComments();
|
this.loadComments();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user