phorge/src/applications/files
epriestley 0318cadad4 Fix two issues with audio macros
Summary:
Fixes T3887. Two issues:

  - Macros were generating entirely before the render cache, so audio macros worked fine in previews and the first time the cache was populated, but not afterward.
    - Instead, parse them before the cache but drop them in after the cache. Clean up all the file querying, too. This makes cached remarkup generate the correct audio beahviors.
  - Safari sends an HTTP request with a "Range" header, and expects a "206 Partial Content" response. If we don't give it one, it sometimes has trouble figuring out how long a piece of audio is (mostly for longer clips? Or mostly for MP3s?). I'm not exactly sure what triggers it. The net effect is that "loop" does not work when Safari gets confused. While looping a short "quack.wav" worked fine, longer MP3s didn't loop.
    - Supporting "Range" and "206 Partial Content", which is straightforward, fixes this problem.

Test Plan:
  - Viewed a page with lots of different cached audio macros and lots of different uncached preview audio macros, they all rendered correctly and played audio.
  - Viewed a macro with a long MP3 audio loop in Safari. Verified it looped after it completed. Used Charles to check that the server received and responded to the "Range" header correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3887

Differential Revision: https://secure.phabricator.com/D7166
2013-09-28 15:32:48 -07:00
..
application File - add transactions and editor 2013-09-05 13:11:02 -07:00
conduit File - add transactions and editor 2013-09-05 13:11:02 -07:00
config Support audio files with HTML5 <audio /> 2013-09-27 10:51:25 -07:00
controller Fix two issues with audio macros 2013-09-28 15:32:48 -07:00
editor Add support for more granular sending of email in application transactions 2013-09-13 15:08:17 -07:00
engine Muck around with Diviner method documentation display 2013-09-08 09:15:22 -07:00
engineselector
exception
lipsum
mail File - add transactions and editor 2013-09-05 13:11:02 -07:00
management Fix a small bug - %d => %s 2013-08-02 11:20:25 -07:00
phid Policy - introduce parentQuery and pass around policy configuration from parent to child 2013-09-11 12:19:34 -07:00
query Kill PhabricatorObjectDataHandle 2013-09-11 12:27:28 -07:00
remarkup Support audio files with HTML5 <audio /> 2013-09-27 10:51:25 -07:00
storage Support audio files with HTML5 <audio /> 2013-09-27 10:51:25 -07:00
view Fix file upload redirect URI 2013-05-31 14:35:25 -07:00
PhabricatorImageTransformer.php PNG thumbnail compression 2013-09-11 09:31:28 -07:00