mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-03-12 07:53:40 -04:00
feat: Video Trimmer and more
This commit is contained in:
@@ -180,16 +180,13 @@ export default function ViewerInfoContent(props) {
|
||||
let split = match.split(':'),
|
||||
s = 0,
|
||||
m = 1;
|
||||
let searchParameters = new URLSearchParams(window.location.search);
|
||||
|
||||
while (split.length > 0) {
|
||||
s += m * parseInt(split.pop(), 10);
|
||||
m *= 60;
|
||||
}
|
||||
searchParameters.set('t', s);
|
||||
|
||||
const wrapped =
|
||||
'<a href="' + MediaPageStore.get('media-url').split('?')[0] + '?' + searchParameters + '">' + match + '</a>';
|
||||
const wrapped = `<a href="#" data-timestamp="${s}" class="video-timestamp">${match}</a>`;
|
||||
return wrapped;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user