Edgewall Software

Opened 3 years ago

Last modified 3 years ago

#13175 new enhancement

Add video renderer in Trac core

Reported by: Jun Omae Owned by:
Priority: normal Milestone: next-stable-1.4.x
Component: rendering Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Trac is able to render an image file but not a video file. I'd like to add the following component to trac/mimeview/api.py.

class VideoRenderer(Component):


    def get_quality_ratio(self, mimetype):
        if mimetype.startswith('video/'):
            return 8
        return 0

    def render(self, context, mimetype, content, filename=None, url=None):
        if url:
            return tag.div(tag.video(src=url, alt=filename, type=mimetype,

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 3 years ago

Good idea.

in reply to:  1 comment:2 by Christian Boos, 3 years ago

Replying to Ryan J Ollos:

Good idea.


So what about your TH:MovieMacro? Was there anything more there that would still make it relevant for the HTML5 version of Trac? If so, anything that can be ported over on top of your <video> suggestion?

(well, obviously we'd need to add at least a proper Video macro to render the above tag)

Last edited 3 years ago by Christian Boos (previous) (diff)

comment:3 by Ryan J Ollos, 3 years ago


comment:4 by Ryan J Ollos, 3 years ago


Moving forward since we'll be releasing soon. Please feel free to move back if you'd like to include the change in 1.2.5 within the next few days.

comment:5 by Ryan J Ollos, 3 years ago

Milestone: 1.2.6next-stable-1.4.x

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.