How to get media entity field value in twig?
Right now, the Media module does not pass its object in the variables like Paragraphs and Node does. This is why media.field_my_boolean.value does nothing.

You can correct this in your theme by implementing theme_preprocess_media, which adds the media object to the variables:

/**
 * Prepares variables for media templates.
 *
 * Default template: media.html.twig.
 *
 * @param array $variables
 *   An associative array containing:
 *   - media: An individual media for display.
 */
function mytheme_preprocess_media(&amp;$variables) {
  $variables['media'] = $variables['elements']['#media'];
}


You can then access media. in your twig template and any connected fields on it just like Paragraph or Node.