Opened 5 years ago
Last modified 14 months ago
#13175 new enhancement
Add video renderer in Trac core
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | rendering | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
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): implements(IHTMLPreviewRenderer) 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, controls='controls'), class_='video-file')
Attachments (0)
Change History (6)
follow-up: 2 comment:1 by , 5 years ago
comment:2 by , 5 years ago
Replying to Ryan J Ollos:
Good idea.
+1
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)
comment:3 by , 5 years ago
Milestone: | 1.2.4 → 1.2.5 |
---|
comment:4 by , 5 years ago
Milestone: | 1.2.5 → 1.2.6 |
---|
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 , 5 years ago
Milestone: | 1.2.6 → next-stable-1.4.x |
---|
Good idea.