# observe\_media\_viewer\_consent/2

Source: https://zotonic.com/docs/2361/observe_media_viewer_consent-2

URI: https://zotonic.com/id/2361

Language: en



Optionally wrap HTML with external content so that it adheres to the cookie/privacy settings of the current site visitor. Typically called with a ‘first’ by the code that generated the media viewer HTML, as that code has the knowledge if viewing the generated code has any privacy or cookie implications.

Type:

[first](/id/doc_developerguide_notifications#notification-first)

Return:

\{ok, HTML\} or undefined

`#media_viewer_consent{}` properties:

- id: `m_rsc:resource_id()|undefined`
- consent: `union`
- html: `iodata`
- viewer\_props: `z_media_identify:media_info()`
- viewer\_options: `list`

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2361?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2361?language=en>)
