{"result":{"depiction_url":null,"edges":{"observes":{"objects":[{"created":"2026-09-09T13:47:43Z","object_id":{"id":1733,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_viewer","title":"observe_media_viewer\/2","uri":"https:\/\/zotonic.com\/id\/1733"},"seq":1},{"created":"2026-09-09T13:47:43Z","object_id":{"id":1757,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_import","title":"observe_media_import\/2","uri":"https:\/\/zotonic.com\/id\/1757"},"seq":2},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2052,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_rsc_update","title":"observe_rsc_update\/3","uri":"https:\/\/zotonic.com\/id\/2052"},"seq":3},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2164,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_stillimage","title":"observe_media_stillimage\/2","uri":"https:\/\/zotonic.com\/id\/2164"},"seq":4},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2285,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_media_import_medium","title":"observe_media_import_medium\/2","uri":"https:\/\/zotonic.com\/id\/2285"},"seq":5}],"predicate":{"id":2550,"is_a":["meta","predicate"],"name":"observes","title":{"_type":"trans","tr":{"en":"Observes"}},"uri":"https:\/\/zotonic.com\/id\/observes"}},"references":{"objects":[{"created":"2020-05-30T05:47:32Z","object_id":{"id":1279,"is_a":["text","documentation"],"name":"doc_glossary","title":"Glossary","uri":"https:\/\/zotonic.com\/id\/1279"},"seq":1000000},{"created":"2020-05-30T05:47:32Z","object_id":{"id":1374,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_media","title":"media","uri":"https:\/\/zotonic.com\/id\/1374"},"seq":1000000},{"created":"2020-05-30T05:47:32Z","object_id":{"id":1729,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_config","title":"config","uri":"https:\/\/zotonic.com\/id\/1729"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"refers":{"objects":[{"created":"2026-09-09T13:47:43Z","object_id":{"id":1374,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_media","title":"media","uri":"https:\/\/zotonic.com\/id\/1374"},"seq":1000000},{"created":"2026-09-09T13:47:43Z","object_id":{"id":1729,"is_a":["text","documentation","reference","model"],"name":"doc_model_model_config","title":"config","uri":"https:\/\/zotonic.com\/id\/1729"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"relation":{"objects":[{"created":"2020-08-19T14:24:48Z","object_id":{"id":1901,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_video_embed","title":"mod_video_embed","uri":"https:\/\/zotonic.com\/id\/1901"},"seq":1000000},{"created":"2020-08-19T14:24:48Z","object_id":{"id":1902,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_video","title":"mod_video","uri":"https:\/\/zotonic.com\/id\/1902"},"seq":1000000},{"created":"2020-08-19T14:24:48Z","object_id":{"id":2188,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_audio","title":"mod_audio","uri":"https:\/\/zotonic.com\/id\/2188"},"seq":1000000},{"created":"2020-08-19T14:24:48Z","object_id":{"id":1374,"is_a":["text","documentation","reference","template_tag"],"name":"doc_template_tag_tag_media","title":"media","uri":"https:\/\/zotonic.com\/id\/1374"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:47:43Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2565,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_integrator","title":"Integrator","uri":"https:\/\/zotonic.com\/id\/2565"},"seq":2},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2599,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_api_and_integration","title":"API and integration","uri":"https:\/\/zotonic.com\/id\/2599"},"seq":3},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":4},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2684,"is_a":["categorization","keyword","keyword_technology"],"name":"zotonic_topic_oembed","title":"oEmbed","uri":"https:\/\/zotonic.com\/id\/2684"},"seq":5},{"created":"2026-09-09T13:47:43Z","object_id":{"id":2690,"is_a":["categorization","keyword","keyword_quality"],"name":"zotonic_topic_interoperability","title":"Interoperability","uri":"https:\/\/zotonic.com\/id\/2690"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1737,"is_a":["text","documentation","reference","module"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1737"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_module_mod_oembed","page_url":{"en":"https:\/\/zotonic.com\/docs\/1737\/mod_oembed","x-default":"https:\/\/zotonic.com\/docs\/1737\/mod_oembed"},"preview_url":null,"resource":{"version":3330,"pivot_location_lat":null,"title":"mod_oembed","is_authoritative":true,"body":"<p>Makes media <a href=\"\/id\/doc_glossary#term-resource\">resources<\/a> from embeddable URLs through the\n<a href=\"http:\/\/www.oembed.com\/\">OEmbed<\/a> protocol.<\/p>\n<p>This module, if activated, checks the pasted URLs in the <em>create media \/ page<\/em> dialog of the admin. It will show an\nembed option for services like YouTube, Vimeo or any other service which supports OEmbed.<\/p>\n<p>A saved media resource has a thumbnail image which is downloaded from the OEmbed service and embedded in the resource.\nFurthermore, the resource’s medium record has an <code>oembed<\/code> field which contains the full JSON response of the request.\nThe <code>oembed<\/code> field looks like this:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">&quot;oembed&quot;: {\n  &quot;type&quot;: &quot;video&quot;,\n  &quot;version&quot;: &quot;1.0&quot;,\n  &quot;provider_name&quot;: &quot;Vimeo&quot;,\n  &quot;provider_url&quot;: &quot;http:\/\/vimeo.com\/&quot;,\n  &quot;title&quot;: &quot;Heli Filming Showreel&quot;,\n  &quot;author_name&quot;: &quot;Hot Knees Media&quot;,\n  &quot;author_url&quot;: &quot;http:\/\/vimeo.com\/hotknees&quot;,\n  &quot;is_plus&quot;: &quot;1&quot;,\n  &quot;html&quot;: &quot;&lt;iframe src=\\&quot;http:\/\/player.vimeo.com\/video\/20898411\\&quot; width=\\&quot;640\\&quot; height=\\&quot;362\\&quot; ...&quot;,\n  &quot;width&quot;: 640,\n  &quot;height&quot;: 362,\n  &quot;duration&quot;: 106,\n  &quot;description&quot;: &quot;description..&quot;,\n  &quot;thumbnail_url&quot;: &quot;http:\/\/b.vimeocdn.com\/ts\/138\/106\/138106290_640.jpg&quot;,\n  &quot;thumbnail_width&quot;: 640,\n  &quot;thumbnail_height&quot;: 362,\n  &quot;video_id&quot;: 20898411\n}\n<\/code><\/pre>\n<p>So, to display the HTML of an OEmbedded medium, you would do the following in a template:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{{ id.medium.html }}\n<\/code><\/pre>\n<p>The module also supports the use of the <a href=\"\/id\/doc_template_tag_tag_media\" class=\"doc-reference doc-reference-tag\"><code>tag#media<\/code><\/a> tag:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">{% media m.rsc[id].o.depiction.medium %}\n<\/code><\/pre>\n<p>Note however, that setting dimensions on this media tag is not supported for OEmbed, as the embed width\/height is always\ntaken from the provider.<\/p>\n<h2>Configuration options<\/h2>\n<p>The following <a href=\"\/id\/doc_model_model_config\" class=\"doc-reference doc-reference-model\"><code>model#config<\/code><\/a> options are supported:<\/p>\n<p><code>mod_oembed.embedly_key<\/code><\/p>\n<p>The API key for Embedly. This configuration kan be added set in the admin via the menu <strong>Auth -&gt; External Services<\/strong>.<\/p>\n<p><code>mod_oembed.maxwidth<\/code><\/p>\n<p>Requests the OEmbed service to return an HTML embed code with the requested maximum width. Defaults to 640.<\/p>\n<p><code>mod_oembed.maxheight<\/code><\/p>\n<p>Requests the OEmbed service to return an HTML embed code with the requested maximum height. Not set by default.<\/p>\n<h2>Accepted Events<\/h2>\n<p>This module handles the following notifier callbacks:<\/p>\n<ul><li><code>observe_media_import<\/code>: Expand supported oEmbed URLs into embeddable media metadata and resources.<\/li><li><code>observe_media_import_medium<\/code>: Import a embedded medium for a rsc_import using <code>m_media:get<\/code>.<\/li><li><code>observe_media_stillimage<\/code>: Return the filename of a still image to be used for image tags using <code>oembed_admin:count_missing<\/code>.<\/li><li><code>observe_media_viewer<\/code>: Return the media viewer for the embedded video.<\/li><li><code>observe_rsc_update<\/code>: Check if the update contains video embed information using <code>z_acl:is_allowed<\/code>.<\/li><\/ul>\n<p>Delegate callbacks:<\/p>\n<ul><li><code>event\/2<\/code> with <code>postback<\/code> messages: <code>fix_missing<\/code>.<\/li><li><code>event\/2<\/code> with <code>submit<\/code> messages: <code>admin_oembed<\/code>.<\/li><\/ul>","slug":"mod_oembed","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"3761ae97266ac8b81c707ad0fe879f3b21a79ee91f659961ac9c83440a6d7c04","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":320,"is_a":["meta","category"],"name":"module","title":"Modules","uri":"https:\/\/test.zotonic.com\/id\/320"},"doc_source_path":"apps\/zotonic_mod_oembed\/src\/mod_oembed.erl","publication_start":"2023-01-30T19:24:00Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_oembed\/src\/mod_oembed.erl","pivot_location_lng":null,"doc_source_kind":"module","name":"doc_module_mod_oembed","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:32Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_oembed","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"66cb145eae7002b184e7d8c4c7bba5e53e8248e5\n","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-02T12:40:19Z","title_slug":"mod_oembed"},"uri":"https:\/\/zotonic.com\/id\/1737","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1737"}},"status":"ok"}