for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/** @formatter:off
* ******************************************************************
* Created by Marko Kungla on Jul 3, 2016 - 6:02:37 PM
* Contact [email protected]
* @copyright 2016 Marko Kungla - https://github.com/mkungla
* @license The MIT License (MIT)
*
* @category AframeVR
* @package aframe-php
* Lang PHP (php version >= 7)
* Encoding UTF-8
* File AssetAudio.php
* Code format PSR-2 and 12
* @link https://github.com/mkungla/aframe-php
* @issues https://github.com/mkungla/aframe-php/issues
* ********************************************************************
* Contributors:
* @author Marko Kungla <[email protected]>
* Comments:
* @formatter:on */
namespace AframeVR\Core\Assets;
use \AframeVR\Interfaces\Core\Assets\AssetAudioInterface;
use \AframeVR\Core\Helpers\AssetsAbstract;
final class AssetAudio extends AssetsAbstract implements AssetAudioInterface
{
/**
* Autoplay audio
* @var bool
*/
protected $attr_autoplay;
* Preload audio
* @var string
protected $attr_preload;
public function init()
$this->setDomElementTag('audio');
}
* @param bool $autoplay
* @return AssetAudioInterface
public function autoplay(bool $autoplay = true): AssetAudioInterface
$this->attr_autoplay = $autoplay;
return $this;
* @param string $preload
public function preload(string $preload = 'auto'): AssetAudioInterface
$this->attr_preload = $preload;