This commit is contained in:
Abhinav 2023-09-20 13:11:36 +05:30
parent 4b5d66baf3
commit 9e9298b5e3
2 changed files with 9 additions and 2 deletions

View file

@ -538,7 +538,9 @@ const PhotoFrame = ({
// ignore
}
try {
addLogLine(`[${item.id}] new file getConvertedVideo request`);
addLogLine(
`[${item.id}] new file getConvertedVideo request- ${item.metadata.title}}`
);
fetching[item.id] = true;
if (!filesStore.has(item.id)) {
addLogLine(

View file

@ -411,13 +411,18 @@ export async function getPlayableVideo(
if (isPlayable && !forceConvert) {
return videoBlob;
} else {
addLogLine('video format not supported, converting it');
addLogLine(
'video format not supported, converting it name:',
videoNameTitle
);
const mp4ConvertedVideo = await ffmpegService.convertToMP4(
new File([videoBlob], videoNameTitle)
);
addLogLine('video successfully converted', videoNameTitle);
return new Blob([await mp4ConvertedVideo.arrayBuffer()]);
}
} catch (e) {
addLogLine('video conversion failed', videoNameTitle);
logError(e, 'video conversion failed');
return null;
}