{"id":9369,"date":"2022-10-06T05:09:43","date_gmt":"2022-10-06T05:09:43","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=9369"},"modified":"2022-10-06T05:09:43","modified_gmt":"2022-10-06T05:09:43","slug":"html-autoplay-attribute","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/10\/06\/html-autoplay-attribute\/","title":{"rendered":"HTML autoplay Attribute"},"content":{"rendered":"\n<p>The HTML&nbsp;autoplay&nbsp;attribute is a boolean attribute and specifies that the audio or video will start playing automatically as soon as possible.<\/p>\n\n\n\n<p>You can use this attribute on the following elements:\u00a0&lt;audio>\u00a0and\u00a0&lt;video>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"syntax-2\">Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;tag autoplay&gt;&lt;\/tag&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-span-class-attribute-autoplay-span-attribute-used-on-the-lt-audio-gt-element-4\">Example of the HTML&nbsp;autoplay&nbsp;attribute used on the &lt;audio&gt; element:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;audio controls autoplay&gt;\n      &lt;source src=\"\/build\/audios\/jingle_bells.ogg\" type=\"audio\/ogg\"&gt;\n      &lt;source src=\"\/build\/audios\/audio.mp3\" type=\"audio\/mpeg\"&gt;\n    &lt;\/audio&gt;\n    &lt;p&gt;Click the play button&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"example-of-the-html-span-class-attribute-autoplay-span-attribute-used-on-the-lt-video-gt-element-6\">Example of the HTML&nbsp;autoplay&nbsp;attribute used on the &lt;video&gt; element:<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;Title of the document&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    &lt;video width=\"320\" height=\"240\" controls autoplay&gt;\n      &lt;source src=\u201dhttp:\/\/techslides.com\/demos\/sample-videos\/small.ogv\u201d type=video\/ogg&gt;\n      &lt;source src=\"\/build\/videos\/arcnet.io(7-sec).mp4\" type=video\/mp4&gt;\n    &lt;\/video&gt;\n    &lt;p&gt;Some information about video&lt;\/p&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The HTML&nbsp;autoplay&nbsp;attribute is a boolean attribute and specifies that the audio or video will start playing automatically as soon as possible. You can use this attribute on the following elements:\u00a0&lt;audio>\u00a0and\u00a0&lt;video>. Syntax Example of the HTML&nbsp;autoplay&nbsp;attribute used on the &lt;audio&gt; element: Example of the HTML&nbsp;autoplay&nbsp;attribute used on the &lt;video&gt; element:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[327],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9369"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=9369"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/9369\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=9369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=9369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=9369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}