.gifv support/workaround

by CompaIsMyWaifu

CompaIsMyWaifu
But I can be yours too <3
MLP
Posts: 411
Threads: 33
Joined: May 2015
Reputation: 15
07-13-2015, 12:34 AM
#11284 (1)
I don't remember where I saw this (might have been a slack chat conversation) but our site does not currently support embedding .gifv files as far as I can tell. However, I just wanted to note that I have found a way to temporarily fix this issue on the user end without any site changes:

If you upload a .gifv file to imgur, you can simply take the imgur link and remove the "v" at the end of the URL where it says ".gifv". I haven't tested this with other image hosting sites, but this method has not failed me yet. Just thought you all might want to know :3

Melancholy
すけべ
Admin
Posts: 3,869
Threads: 213
Joined: Jul 2014
Reputation: 60
07-13-2015, 12:37 AM
#11285 (2)
We did used to have support for it, I'll look into doing it again though. :)

fluffy
Junior Member
Kohai
Posts: 2
Threads: 0
Joined: Jun 2015
Reputation: 0
07-17-2015, 05:08 PM
#11924 (3)
This seemed to be the first I had heard of this format… being lewd, however, I seem to have already established a few in my browsing history. I found this out when I typed "gifv" into my address bar to learn more… anyhow, a quick peak at the source code gave me this snippet.

Code:
<a class="" title="Greetings GIF Creators! (HUGE)" href="http://i.imgur.com/zvATqgs.gifv">
    <video autoplay="" loop="" muted="">
        <source type="video/webm" src="http://i.imgur.com/zvATqgs.webm">
        <source type="video/mp4" src="http://i.imgur.com/zvATqgs.mp4">
    </video>
</a>

If we're talking about forum posts or chat messages, seems to me a simple regexp should do the trick.

Code:
~i.imgur.com/(\w+)\.gifv~
~i.imgur.com/$1.webm~

From there just wrap it in a video tag and kick back. This could be implemented as JS or server-side.
Melancholy
すけべ
Admin
Posts: 3,869
Threads: 213
Joined: Jul 2014
Reputation: 60
07-17-2015, 09:55 PM
#11932 (4)
(07-17-2015, 05:08 PM)fluffy Wrote: This seemed to be the first I had heard of this format… being lewd, however, I seem to have already established a few in my browsing history. I found this out when I typed "gifv" into my address bar to learn more… anyhow, a quick peak at the source code gave me this snippet.

Code:
<a class="" title="Greetings GIF Creators! (HUGE)" href="http://i.imgur.com/zvATqgs.gifv">
    <video autoplay="" loop="" muted="">
        <source type="video/webm" src="http://i.imgur.com/zvATqgs.webm">
        <source type="video/mp4" src="http://i.imgur.com/zvATqgs.mp4">
    </video>
</a>

If we're talking about forum posts or chat messages, seems to me a simple regexp should do the trick.

Code:
~i.imgur.com/(\w+)\.gifv~
~i.imgur.com/$1.webm~

From there just wrap it in a video tag and kick back. This could be implemented as JS or server-side.

That's pretty much what I was thinking. Thanks. :)