media.oembed_iframe:
  path: '/media/oembed'
  defaults:
    _controller: '\Drupal\media\Controller\OEmbedIframeController::render'
  requirements:
    _permission: 'view media'

media.settings:
  path: '/admin/config/media/media-settings'
  defaults:
    _form: '\Drupal\media\Form\MediaSettingsForm'
    _title: 'Media settings'
  requirements:
    _permission: 'administer media'

media.filter.preview:
  path: '/media/{filter_format}/preview'
  defaults:
    _controller: '\Drupal\media\Controller\MediaFilterController::preview'
  methods: [GET]
  requirements:
    _entity_access: 'filter_format.use'
    _custom_access: '\Drupal\media\Controller\MediaFilterController::formatUsesMediaEmbedFilter'

editor.media_dialog:
  path: '/editor/dialog/media/{editor}'
  defaults:
    _form: '\Drupal\media\Form\EditorMediaDialog'
    _title: 'Edit media'
  methods: [POST]
  requirements:
    _entity_access: 'editor.use'
