Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15515237
D19424.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19424.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 19, 8:53 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7680689
Default Alt Text
D19424.diff (1 KB)
Attached To
Mode
D19424: Omit "type" attribute from "<source />" tags in "<video>" to trick Chrome into playing them
Attached
Detach File
Event Timeline
Log In to Comment