def render_basic(self, value, context=None):
    if (not value):
        return ''
    video_not_supported_text = _('Your browser does not support video playback.')
    audio_not_supported_text = _('Your browser does not support audio playback.')
    download_video_text = (_('If you cannot view the above video, you can instead %(start_link)sdownload it%(end_link)s.') % {'start_link': '<a href={2} download>', 'end_link': '</a>'})
    download_audio_text = (_('If you cannot listen to the above audio, you can instead %(start_link)sdownload it%(end_link)s.') % {'start_link': '<a href={2} download>', 'end_link': '</a>'})
    if (value.type == 'video'):
        player_code = (((('\n            <div>\n                <video width="320" height="240" {1} controls>\n                    {0}\n                    ' + video_not_supported_text) + "\n                </video>\n            </div>\n            <p class='article__content--video'>") + download_video_text) + '</p>\n            ')
    else:
        player_code = (((('\n            <div>\n                <audio controls>\n                    {0}\n                    ' + audio_not_supported_text) + "\n                </audio>\n            </div>\n            <p class='article__content--audio'>") + download_audio_text) + '</p>\n            ')
    thumbnail = (f'poster={value.thumbnail.url}' if value.thumbnail else '')
    return format_html(player_code, format_html_join('\n', '<source{0}>', [[flatatt(s)] for s in value.sources]), thumbnail, value.url)
def render_basic(self, value, context=None):
    if (not value):
        return 
    video_not_supported_text = _('Your browser does not support video playback.')
    audio_not_supported_text = _('Your browser does not support audio playback.')
    download_video_text = (_('If you cannot view the above video, you can instead %(start_link)sdownload it%(end_link)s.') % {'start_link': '<a href={2} download>', 'end_link': '</a>'})
    download_audio_text = (_('If you cannot listen to the above audio, you can instead %(start_link)sdownload it%(end_link)s.') % {'start_link': '<a href={2} download>', 'end_link': '</a>'})
    if (value.type == 'video'):
        player_code = (((('\n            <div>\n                <video width="320" height="240" {1} controls>\n                    {0}\n                    ' + video_not_supported_text) + "\n                </video>\n            </div>\n            <p class='article__content--video'>") + download_video_text) + '</p>\n            ')
    else:
        player_code = (((('\n            <div>\n                <audio controls>\n                    {0}\n                    ' + audio_not_supported_text) + "\n                </audio>\n            </div>\n            <p class='article__content--audio'>") + download_audio_text) + '</p>\n            ')
    thumbnail = (f'poster={value.thumbnail.url}' if value.thumbnail else )
    return format_html(player_code, format_html_join('\n', '<source{0}>', [[flatatt(s)] for s in value.sources]), thumbnail, value.url)