Modify

Opened 4 years ago

Closed 3 weeks ago

#8807 closed enhancement (fixed)

Various improvements to MovieMacro

Reported by: sgifford Owned by: t2y
Priority: normal Component: MovieMacro
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

I have implemented several improvements to MovieMacro, including:

  • Updating to latest version of flowplayer
  • Support Image-macro style path arguments for local files (attachment:file.mp4, wiki:TestPage:2357b.mp4, etc.)
  • Support for configuring in INI file:
    • Default height
    • Default width
    • Streaming provider
    • SWF file URL
  • Support for setting in macro arguments:
    • Starting position for scrubber (startpos)
    • Clip start (implemented per Flowplayer docs, seems not to work) (stime)
    • Clip duration (duration)

Attachments (1)

moviemacro-sg-8807.patch (11.3 KB) - added by sgifford 4 years ago.
Patch with changes described in #8807

Download all attachments as: .zip

Change History (14)

Changed 4 years ago by sgifford

Patch with changes described in #8807

comment:1 Changed 4 years ago by sgifford

Note that these also require flowplayer 3.2.7 or (hopefully) newer, currently available from:

http://flowplayer.org/download/index.html

comment:3 Changed 4 weeks ago by t2y

I changed to set default width, height, splash image using trac.ini like this.

[moviemacro]
width = 320px
height = 180px
splash = test.png

comment:4 Changed 4 weeks ago by t2y

  • Owner changed from lcordier to t2y
  • Status changed from new to assigned

comment:5 in reply to: ↑ description Changed 4 weeks ago by t2y

Replying to sgifford:

  • Support Image-macro style path arguments for local files (attachment:file.mp4, wiki:TestPage:2357b.mp4, etc.)

Yup, that makes using moviemacro easy.

comment:6 Changed 4 weeks ago by t2y

ImageMacro parses the argument by itself without utility function. I will support restricted simple format only.

https://github.com/edgewall/trac/blob/trunk/trac/wiki/macros.py#L518

comment:8 Changed 4 weeks ago by rjollos

If the json requirement is the only reason for the Python >= 2.6 restriction in [14231], it would be easy enough to add a fallback:

try:
    import json
except ImportError:
    import simplejson as json

and also conditionally add simplejson to requirements. For example, see: tracticketchangelogplugin/0.12/setup.py@13960:55#L37

Last edited 4 weeks ago by rjollos (previous) (diff)

comment:9 Changed 4 weeks ago by jun66j5

The plugin supports only 2.6 and later, according to moviemacro/trunk/setup.py@14231:7-8.

However, we can replace with to_json (trac.util.presentation) which is available since Trac 0.12. Because it seems json library is used for only encoding to json string. At least, I think we can simply use json.dumps(query_dict) rather than json.JSONEncoder().encode(query_dict).

comment:10 Changed 4 weeks ago by t2y

Thank you for good advice. I will replace to_json if possible, then we can remove Python > 2.6 limit. Also, I misunderstood json.dumps function, you're right. :)

comment:11 Changed 4 weeks ago by t2y

It works and increased maintainability by changeset:14232. Thank you!

comment:12 Changed 3 weeks ago by t2y

  • Trac Release changed from 0.11 to 0.12

This change has been included in 0.3 version (ticket:12046#comment:2).

comment:13 Changed 3 weeks ago by t2y

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed The owner will remain t2y.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.