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

Is there a way to add <video> support? #154

Open
damirkotoric opened this issue Apr 8, 2020 · 1 comment · May be fixed by #214
Open

Is there a way to add <video> support? #154

damirkotoric opened this issue Apr 8, 2020 · 1 comment · May be fixed by #214

Comments

@damirkotoric
Copy link

damirkotoric commented Apr 8, 2020

Great library. I'd love to do the same effect but for video tags. Is there a way of doing this?

I have some autoplaying screen recordings like so:

<video src="..." autoplay muted loop></video>

And it'd be great if these videos had the same zoom functionality as the rest of the images on the page. And I don't want to use GIF images because of quality.

I tried setting data-zoomable on the video tags but that didn't do anything.

@damirkotoric damirkotoric changed the title Is there a way to add video support? Is there a way to add <video> support? Apr 9, 2020
@wzhkobe2408
Copy link

@damirkotoric this is the source code in utils.js. If you want to support video, you can try to modify it with
export const isSupported = node => node.tagName === 'IMG' || node.tagName === 'VIDEO'

source code

export const isSupported = node => node.tagName === 'IMG'

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

Successfully merging a pull request may close this issue.

3 participants