@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Prevent media from autoplaying when rendered as a feed story

Summary: Fixes T11845. Users can still embed a text panel on the home page to give it some ambiance.

Test Plan: Wrote an autoplay video as a comment, saw it in feed. Before change: autoplay. After change: no auto play. On task: still autoplay.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11845

Differential Revision: https://secure.phabricator.com/D16920

+11 -1
+1 -1
src/applications/feed/story/PhabricatorFeedStory.php
··· 462 462 } 463 463 464 464 public function newMarkupEngine($field) { 465 - return PhabricatorMarkupEngine::getEngine(); 465 + return PhabricatorMarkupEngine::getEngine('feed'); 466 466 } 467 467 468 468 public function getMarkupText($field) {
+6
src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
··· 252 252 $autoplay = null; 253 253 } 254 254 255 + // Rendering contexts like feed can disable autoplay. 256 + $engine = $this->getEngine(); 257 + if ($engine->getConfig('autoplay.disable')) { 258 + $autoplay = null; 259 + } 260 + 255 261 return $this->newTag( 256 262 $tag, 257 263 array(
+4
src/infrastructure/markup/PhabricatorMarkupEngine.php
··· 414 414 case 'default': 415 415 $engine = self::newMarkupEngine(array()); 416 416 break; 417 + case 'feed': 418 + $engine = self::newMarkupEngine(array()); 419 + $engine->setConfig('autoplay.disable', true); 420 + break; 417 421 case 'nolinebreaks': 418 422 $engine = self::newMarkupEngine(array()); 419 423 $engine->setConfig('preserve-linebreaks', false);