You are here

public function AmpFormTrait::validAutoplay in Accelerated Mobile Pages (AMP) 8.3

The autoplay setting, taking into account user permissions.

File

src/AmpFormTrait.php, line 272

Class

AmpFormTrait
AMP Form trait.

Namespace

Drupal\amp

Code

public function validAutoplay() {
  return $this->currentUser
    ->hasPermission('never autoplay videos') ? FALSE : $this
    ->getSetting('autoplay');
}