Smartstore icon indicating copy to clipboard operation
Smartstore copied to clipboard

In MediaGallery template, check if a handler for video files exists and render some kind of fallback if there is not

Open suatsuphi opened this issue 1 year ago • 16 comments

Hi,

Preview picture does not appear in videos.

I thought it was caused by the video, so I tried it in the live demo. https://ibb.co/VtNKC45

When I try it on the current project, it looks like the picture. https://ibb.co/rQQkVZM

suatsuphi avatar Dec 04 '23 20:12 suatsuphi

Hi,

I have not been able to reproduce this issue. What file format are you using?

Regards

markwoerdenweber avatar Dec 06 '23 07:12 markwoerdenweber

nakliye.mp4 this file exists here: https://core.smartstore.com/backend/admin/mediamanager/?path=catalog

Cauld you test in debugging mode on visual studio? https://localhost:44325/ upload video for any product and view product

suatsuphi avatar Dec 06 '23 12:12 suatsuphi

This is what it looks like on my screen:

productdetails-video-preview-small

After refreshing the page, the backend displayed the preview image.

markwoerdenweber avatar Dec 06 '23 13:12 markwoerdenweber

ezgif-1-1e12824eb4 I'm not working on hosting. I run the project on visual studio After refreshing the page last seconds, not displayed the preview image.

suatsuphi avatar Dec 06 '23 13:12 suatsuphi

Untitled

the image doesn't come from the url here. it is a video http://localhost:44325/media/253/catalog/nakliye2.mp4?size=680

suatsuphi avatar Dec 06 '23 13:12 suatsuphi

It could be a problem caused by referencing an mp4 file in an img tag. Could you test this in an independent context? Also, what browser are you using?

markwoerdenweber avatar Dec 07 '23 09:12 markwoerdenweber

https://github.com/smartstore/Smartstore

1- I downloaded and ran the project 2- SQL Server or SQLITE and Media storage= File System that I did the installation by selecting 3- I have attached any video to any product.

Could you download it from github as a new project and try it?

suatsuphi avatar Dec 07 '23 13:12 suatsuphi

I could not reproduce the problem on a fresh installation either. What browser are you using, and have you tested whether a simple HTML file containing an img tag with the src attribute pointing to an mp4 file will display the preview image correctly?

markwoerdenweber avatar Dec 12 '23 09:12 markwoerdenweber

Untitled

<!DOCTYPE html> 
<html> 
<body> 

<video width="400" controls>
  <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
  Your browser does not support HTML video.
</video>

</body> 
</html>

Microsoft Edge Version 120.0.2210.61 (Official build) (64-bit)

Chrome 120.0.6099.71 (Official Compilation) (64 bit)

Firefox 120.0.1 (64 bit)

I said that I download the project from github and run it in debug mode on visual studio.

could you be using it together with Media-Manager?

Can you give a link to the Media-Manager demo version?

suatsuphi avatar Dec 12 '23 14:12 suatsuphi

Untitled

there is an error message where I marked slick-lazyload-error

suatsuphi avatar Dec 12 '23 15:12 suatsuphi

thumb images that occur when I upload images do not occur when I upload videos

suatsuphi avatar Dec 17 '23 19:12 suatsuphi

Automatic thumbnail generation for videos is an exclusive feature of Media Manager.

If you're interested, please contact [email protected] for more information.

markwoerdenweber avatar Dec 19 '23 07:12 markwoerdenweber

Can the bug at least be fixed, because the picture is not shown, but instead the video or the picture of the video icon can be shown? slick-lazyload-error

suatsuphi avatar Dec 19 '23 08:12 suatsuphi

Please make sure that mp4 is defined as valid video extension via Configuration / Settings / Media / Media types / Video.

However, without the Media Manager plugin you won't get a thumbnail, just an icon.

muratcakir avatar Dec 19 '23 20:12 muratcakir

Untitled

However, without the Media Manager plugin you won't get a thumbnail, just an icon.

as you said, there is no need for a small image. just don't give an error, it gives an error that the image cannot be displayed. can the img tag be removed? the play button is enough

Untitled2

It gives error when img tag!

suatsuphi avatar Dec 19 '23 20:12 suatsuphi

can this problem be fixed? I made a patch like below.

Can it be added to 5.2.0?

MediaGallery.cshtml

else
{
    <figure class="file-figure gal-item-content">
        <picture class="file-thumb show fs-display-3" data-type="video" title="@file.TitleAttribute">
            <img class="file-img d-none" attrs="@srcAttributes" alt="@file.Alt" />
            <video class="file-video" alt="@file.Alt" attrs="@srcAttributes">
                <source src="@file.GetUrl()" type="video/mp4">
            </video>
        </picture>
    </figure>
}


suatsuphi avatar Jun 16 '24 14:06 suatsuphi