Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having a mixed images/videos gallery displays the application instead of video #398

Closed
gherci opened this issue Jul 29, 2021 · 4 comments · Fixed by #409 or #411
Closed

Having a mixed images/videos gallery displays the application instead of video #398

gherci opened this issue Jul 29, 2021 · 4 comments · Fixed by #409 or #411
Labels

Comments

@gherci
Copy link

gherci commented Jul 29, 2021

What is the expected behaviour?

To have a mix of images, videos, youtube videos and when you scroll right and left to display the current video/image

What is the current behaviour?

When i scroll to the video and then i go back left to a picture, and then i again come back to the video instead of the video, it displays the application

What are the steps to reproduce?

i have the gallery implemented like this in template:
<gallery [items]="images" gallerize></gallery>
and in the component:

this.images = [
      new ImageItem({
        src: 'https://www.gettyimages.com/gi-resources/images/500px/983794168.jpg',
        thumb: 'https://www.gettyimages.com/gi-resources/images/500px/983794168.jpg'
      }),
      new ImageItem({
        src: 'https://i.pinimg.com/originals/74/64/49/7464497f78fe88669948fe177c6916fe.jpg',
        thumb: 'https://i.pinimg.com/originals/74/64/49/7464497f78fe88669948fe177c6916fe.jpg'
      }),
      new YoutubeItem({
        type: 'video',
        src: '9dblgPmgwU8',
      }),
    ];

And it is functioning but with this bug.
I have 3 pictures and 1 youtube video, when i scroll to the video and then i go back left to a picture, and then i again come back to the video instead of the video, it displays the application as you can see in the recorded.

Have this ever happened to you? What could trigger this behaviour?

image
image
youtubeVideoBug

What is the use-case or motivation for changing an existing behaviour?

Which versions are you using for the following packages?

Angular: 12.1.2
Angular CDK: 12.1.3
Angular CLI: 12.1.3
Typescript: 4.3.5
Gallery: 5.0.0

Is there anything else we should know?

@MurhafSousli
Copy link
Owner

it is working fine in the demo, please add a reproduction here https://stackblitz.com/edit/ngx-gallery

@NexGenUA
Copy link
Contributor

it is working fine in the demo, please add a reproduction here https://stackblitz.com/edit/ngx-gallery

no, it isn't
I added two videos to the demo and got the same issue
https://stackblitz.com/edit/ngx-gallery-mcyvwt

NexGenUA added a commit to NexGenUA/ngx-gallery that referenced this issue Oct 30, 2021
MurhafSousli pushed a commit that referenced this issue Nov 1, 2021
MurhafSousli added a commit that referenced this issue Nov 1, 2021
@MurhafSousli MurhafSousli mentioned this issue Nov 1, 2021
This was linked to pull requests Nov 1, 2021
@MurhafSousli
Copy link
Owner

MurhafSousli commented Nov 1, 2021

@NexGenUA Thanks for the PR, there is still a bug if the slider size is smaller than the viewport size, I added a comment on your merged PR that shows the bug

@MurhafSousli
Copy link
Owner

Fixed in v5.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants