gre / transitions.glsl.io

WE HAVE MOVED TO
https://gl-transitions.com/
Other
91 stars 10 forks source link

Transitions between videos? #89

Closed j0hn closed 9 years ago

j0hn commented 9 years ago

Is it possible to create transitions using <video> elements instead of <img>?

gre commented 9 years ago

Can you explain a bit more, I'm not understanding your question, I suspect you have used an HTML markup in your question? Github doesn't allow that and will replace blank ^^

Thanks

j0hn commented 9 years ago

huh, sorry, i updated the comment

gre commented 9 years ago

Technically yes it is possible.

So GLSL.io uses glsl-transition which is the minimal core library for running a GLSL Transition.

and with the use of gl-texture2d you can create Texture from a < video / >.

If you want, you can give try, otherwise I will try to provide an "Example 3" in glsl-transition.

As a side note: Recently I've been working on diaporama which provides an higher level API to use GLSL Transitions specifically for making slideshows. However it does not support yet videos.

gre commented 9 years ago

DEMO: http://greweb.me/glsl-transition/examples/3/

code: https://github.com/gre/glsl-transition/blob/master/examples/3/index.js

That's just one example. the 3 videos are looping and there is no pauses between the transitions.

Also you have to know that < video /> is still not very stable and consistent across OS, Browsers, Platform (especially mobile). You may reach issues in term of support and load event. I used a workaround to load the video via an Ajax request first.

j0hn commented 9 years ago

that's awesome, thanks!