Embed media by pasting a URL to the media (e.g. from YouTube)

I don’t really understand the delineation here between “official” or not.

On one of my observations I have a link to camera trap footage for which you really need to see the video. The images simply do not suffice. The linked footage is integral to the ID.
Is this not an “official” part of the observation?

It would be great to see a version of this feature implemented given that support for gifs is apparently being phased out.

i think this request is talking about putting media – video, audio, sounds – inline into the text of comments and notes and such. right now, you can add images using html or markup, but you can’t just paste an image into the text of the comment or notes. for sounds and video, you can’t even add them using html.

i don’t think this request is talking about actually adding video as one of the types of evidence that can go into an observation. (there is a separate feature request for adding video as evidence: https://forum.inaturalist.org/t/upload-videos/5426 .)

2 Likes

Yeah I am thinking more about the ability to embed video into comments with markup than upload full videos directly… as that seems like it might be a long way away.

It confuses me why it’s not possible to embed video at the moment - especially if it is possible with images ( which I had forgotten / didn’t realise ). It seems like a good interim solution. I don’t see significant downsides.

iNat supports image tags in their comments but but not audio or video tags. most modern browsers should support any of these, but audio and video are harder to control because, by default, the browser will control what the audio and video player looks like, including what controls are available and other behavior (like autoplay, etc.). not every site wants to delegate all this to the browser. so it may be better to not show these at all, rather than take on the the task of controlling all that.

also, videos hosted in a places like YouTube require their own special video player because those sites don’t just expose the actual video file. so you’d have to be able to embed an iframe to display their player. so not every site wants to allow iframes in general, or else to have to handle a special interface for every video hosting site out there (YouTube, Vimeo, etc.)

1 Like

yeah… I mean I was just imagining handling an iframe for youtube
that would suffice here…
I just don’t see why this is complex, sorry
but doubtless I’m missing something!

I just uploaded an iframe to a blank html sketch and tested on three browsers
There was no difference in the look across Firefox/Chrome/Safari.
The controls were just decided by the embed options from Youtube when sharing :

Screenshot 2024-02-23 at 01.31.08


you mean there is a downside specifically to using iframes?
not sure I understand what you meant by this statement

embedding a video file in a video tag is different from embedding a YouTube video in an iframe. the look and feel of the YouTube video player in an iframe will be controlled by YouTube developers. the player for a video using video tags will be controlled by either the browser or potentially iNat developers.

an iframe is basically a nested webpage. if you allow an iframe for YouTube, you’re potentially allowing iframes for anything. even though iframes are theoretically sandboxed, there are are ways to make iframe content malicious, and that’s usually the main concern with allowing these to be included in your site, especially when third parties are the ones effectively adding them to your site.

2 Likes

surely there are ways to protect against malicious usage?

according to this StackOverflow thread at least, the argument seems to be null and void :

" If anybody claims that using an <iframe> element on your site is dangerous and causes a security risk, they do not understand what <iframe> element does, or they are speaking about possibility of <iframe> related vulnerabilities in browsers. Security of <iframe src="..."> tag is equal to <img src="..." or <a href="..."> as long there are no vulnerabilities in the browser. And if there’s a suitable vulnerability, it might be possible to trigger it even without using <iframe>, <img> or <a> element, so it’s not worth considering for this issue."

or are you referencing something different to that which is discussed in the thread there?

either way, these issues don’t seem unsurmountable

you may be able to protect against what you know about and can imagine, but you can’t know about and imagine all the potential problems out there, and this becomes very relevant especially if you allow third parties to add content to your site (such as allowing users to add iframes to iNat comments). if you read the entirety of the post you quoted from StackExchange, they acknowledge some of the threats but downplay them by making various assumptions.

there are always ways to mitigate threats and to standardize design, but these all take effort to implement and maintain. so it’s a question of whether that kind of effort is a higher priority than other efforts.

you’re already able to link to videos hosted at other sites. i’m not sure what huge benefit is gained by allowing the videos to be embedded directly into comments.

if we’re talking about allowing videos to be supplied as evidence for an observation, that’s a different topic altogether, as i noted in my first post in this thread.

1 Like

following this logic we could also just have links to audio as well…and images!
iNaturalist could be pure text :crazy_face:

as far as I can see it will always be optimal to have connected media as accessible as possible within the observation itself… seems like another no-brainer from where I’m standing… so guess we will have to just agree to disagree here again :sweat_smile:

as Tony said :

Kueda is also on the record saying he would like to support video in theory, but “it’s a heavy lift”. Video via markdown is just a practical compromise in the meantime, especially if gifs are due to be phased out and not replaced with an alternative.

What I did not see in this discussion is how hosting videos would advance the main missions of iNaturalist. When I consider that platforms such as Moth Photographers Group, BugGuide, and so forth have not found it necessary to host videos, it is not obvious to me why iNaturalist needs to do so.

this is the case for adding audio references to comments. as far as i know, you can’t embed audio into comments. i think you’re starting to conflate embedding of media into comments and the addition of media as evidence in observations.

as i’ve noted several times in our earlier discussion:

i think the discussion is purposely avoiding this because that’s a separate topic, as noted above.

I disagree. Given that iNat’s development staff and budget are limited, features that advance the main missions should take priority over others.

i don’t disagree with this sentiment, but if you’re talking specifically about “hosting videos”, that’s a separate discussion.

3 Likes

I see a few problems with linking to external media, if the content of the link is something relevant, it might get lost in a lot of circumstances: the user who wants to view it happens to be in a country there youtube is illegal (e.g. China); the video might have been taken down; the account containing the video might have been revoked for copyright reasons etc. Then we’d need a method to verify that the account on youtube is the same physical person as the account on Inat in order to avoid malicious actions.

Other problem: a malevolent user might enter an URL to a valid video and later change the content at that URL into e.g. CSAM, making Inat legally responsible for having links that point to illegal material (the possession of such links, even unintentionally, is punishable in most jurisdictions).

I generally feel uneasy when my files are under somebody else’s control (that’s also why I always download podcasts, movies etc. onto my device and consume them from there.). Just remember how Amazon remotely deleted Orwell’s Animal Farm from customers’ devices, this would be even eassier nowadays with the files being in the cloud.

With non-video stuff (i.e. images and sounds - videos are too large), there would be a simple solution: for those media-hosting sites that support it (e.g. soundcloud, flickr), the Inat server would immediately download a copy of the media file from the hosting site into itself, thus avoiding the problems mentioned above. yt-dlp is able to get stuff from almost anywhere.

What remains is the problems that videos are huge and Inat’s ressources are limited, but I agree with the turkey vulture problem mentioned by @benarmstrong in 2019. I just don’t know how to solve it (maybe hosting videos ony in exceptional cases like this one, requiring the intervention of an administrator).

No matter what decision is made, as a user I’d prefer to have external links stand out clearly recognizable as such to that I can decide what to do with them (e.g. open in another browser tab, copy the URL to the clipboard and hand it over to yt-dlp or whatever; wait until I have Wifi to preserve my data plan). I.e. no iframes etc.

2 Likes

I’m going to close this request. It’s gotten a small number of votes over the past five years and would radically change the way observation pages would look and load. YouTube videos and the link can always be linked to in descriptions and comments.