Modify

Opened 7 years ago

Closed 3 years ago

#8807 closed enhancement (fixed)

Various improvements to MovieMacro

Reported by: Scott Gifford Owned by: Tetsuya Morimoto
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 Scott Gifford 7 years ago.
Patch with changes described in #8807

Download all attachments as: .zip

Change History (14)

Changed 7 years ago by Scott Gifford

Attachment: moviemacro-sg-8807.patch added

Patch with changes described in #8807

comment:1 Changed 7 years ago by Scott Gifford

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

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

comment:3 Changed 3 years ago by Tetsuya Morimoto

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 3 years ago by Tetsuya Morimoto

Owner: changed from Louis Cordier to Tetsuya Morimoto
Status: newassigned

comment:5 in reply to:  description Changed 3 years ago by Tetsuya Morimoto

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 3 years ago by Tetsuya Morimoto

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 3 years ago by Ryan J Ollos

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 3 years ago by Ryan J Ollos (previous) (diff)

comment:9 Changed 3 years ago by Jun Omae

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 3 years ago by Tetsuya Morimoto

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 3 years ago by Tetsuya Morimoto

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

comment:12 Changed 3 years ago by Tetsuya Morimoto

Trac Release: 0.110.12

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

comment:13 Changed 3 years ago by Tetsuya Morimoto

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Tetsuya Morimoto.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.