2021年1月22日星期五

show video in SweetAlert

Good afternoon, I'm using SweetAlert to show notifications, looking in the official SweetAlert documents they show some examples, for example to show images, but what I'm trying to do is show a youtube video.

SweetAlert2

Swal.fire({    title: 'Sweet!',    text: 'Modal with a custom image.',    imageUrl: 'https://unsplash.it/400/200',    imageWidth: 400,    imageHeight: 200,    imageAlt: 'Custom image',  })  

Any recommendation to show Youtube video on SweetAlert.

Some examples I have done is embed the video with iframe:

<iframe width="560" height="315" src="https://www.youtube.com/embed/d_elXY2Lcfk" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>  

But I want that just by placing the path I can see the video.

https://stackoverflow.com/questions/65854871/show-video-in-sweetalert January 23, 2021 at 09:28AM

没有评论:

发表评论