autoplay when clicked
This commit is contained in:
@@ -226,7 +226,7 @@ class Embed {
|
||||
img.onclick = async () => {
|
||||
img.remove();
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.src = this.json.video.url;
|
||||
iframe.src = this.json.video.url + "?autoplay=1";
|
||||
if (this.json.thumbnail.width && this.json.thumbnail.width) {
|
||||
iframe.style.width = this.json.thumbnail.width + "px";
|
||||
iframe.style.height = this.json.thumbnail.height + "px";
|
||||
|
@@ -234,7 +234,7 @@ class Embed{
|
||||
img.onclick=async ()=>{
|
||||
img.remove();
|
||||
const iframe=document.createElement("iframe");
|
||||
iframe.src=this.json.video.url;
|
||||
iframe.src=this.json.video.url+"?autoplay=1";
|
||||
if(this.json.thumbnail.width&&this.json.thumbnail.width){
|
||||
iframe.style.width=this.json.thumbnail.width+"px";
|
||||
iframe.style.height=this.json.thumbnail.height+"px";
|
||||
|
Reference in New Issue
Block a user