Page MenuHomePhabricator

D19424.id46465.diff
No OneTemporary

D19424.id46465.diff

diff --git a/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php b/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
--- a/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
+++ b/src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
@@ -260,6 +260,18 @@
$autoplay = null;
}
+ if ($is_video) {
+ // See T13135. Chrome refuses to play videos with type "video/quicktime",
+ // even though it may actually be able to play them. The least awful fix
+ // based on available information is to simply omit the "type" attribute
+ // from `<source />` tags. This causes Chrome to try to play the video
+ // and realize it can, and does not appear to produce any bad behavior in
+ // any other browser.
+ $mime_type = null;
+ } else {
+ $mime_type = $file->getMimeType();
+ }
+
return $this->newTag(
$tag,
array(
@@ -274,7 +286,7 @@
'source',
array(
'src' => $file->getBestURI(),
- 'type' => $file->getMimeType(),
+ 'type' => $mime_type,
)));
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 22, 5:45 AM (6 d, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7680689
Default Alt Text
D19424.id46465.diff (1 KB)

Event Timeline