<commit_before>###
Handle viewing images and videos
###

{MediaViewer}            = require('./viewer')
{register_file_editor}   = require('../project_file')
{IMAGE_EXTS, VIDEO_EXTS} = require('../file-associations')

register_file_editor
    ext       : IMAGE_EXTS
    icon      : 'file-image-o'
    component : MediaViewer

register_file_editor
    ext       : VIDEO_EXTS
    icon      : 'file-video-o'
    component : MediaViewer
<commit_msg>make new media component work for both public and private<commit_after>###
Handle viewing images and videos
###

{MediaViewer}            = require('./viewer')
{register_file_editor}   = require('../project_file')
{IMAGE_EXTS, VIDEO_EXTS} = require('../file-associations')

for is_public in [true, false]
    register_file_editor
        ext       : IMAGE_EXTS
        icon      : 'file-image-o'
        component : MediaViewer
        is_public : is_public

    register_file_editor
        ext       : VIDEO_EXTS
        icon      : 'file-video-o'
        component : MediaViewer
        is_public : is_public

{'fraction_non_alphanumeric': 0.10690633869441817, 'fraction_numerical': 0.0, 'mean_word_length': 2.6109215017064846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3620791', 'n_tokens_mistral': 331, 'n_tokens_neox': 325, 'n_words': 72}