ipfs / ipfs-companion

Browser extension that simplifies access to IPFS resources on the web
https://docs.ipfs.tech/install/ipfs-companion/
Creative Commons Zero v1.0 Universal
2.05k stars 325 forks source link

Documentation on how to embed a video or image that is hosted on IPFS. #683

Closed PurgingPanda closed 5 years ago

PurgingPanda commented 5 years ago

I cannot seem to find how to embed content that is hosted on IPFS. It would be helpfull to know how to embed a video on a page. Simply using an ipfs link like "ipfs://hash" does not seem to work.

lidel commented 5 years ago

@PurgingPanda short answer is you use URL pointing at a public gateway: https://<your-domain>/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR.

This way everyone will be able to load the content over HTTP, even people without IPFS client. By using HTTP gateway you can add content to IPFS but load it using well-known HTTP semantics. You can run go-ipfs on your own server, or point at one of public gateways. If you expect a lot of traffic, hybrid approach of your own go-ipfs gateway + js-ipfs in service worker (see below) may be a better idea.

If you want to truly decentralize the distribution of your videos, you can either:

ps. I am closing this issue as this repository is not the best place for Q&A. To ask questions, discuss new ideas, or get support for problems check https://discuss.ipfs.io You can also hop on IRC (#ipfs on Freenode) for a quick chat.