我想从此类链接下载视频
正如你所看到的我的代码。我希望当有人单击图像时,视频会下载到设备上。我尝试过编码,但是当我单击图像时,它会打开 HTML5 视频播放而不是下载。有人可以帮忙处理这段代码吗?
<p>Click on the w3schools logo to download the video :<p><a href="https://rr2---sn-o3o-qxaz.googlevideo.com/videoplayback?expire=1645528580&ei=pHEUYrN02YCHBtf6mIgP&ip=54.85.142.246&id=o-AIfHFv3b9xkFI4jHB2fKmIk540PGChGAN8iEEkLVmN9c&itag=22&source=youtube&requiressl=yes&vprv=1&mime=video%2Fmp4&ns=Uzk-AULVZFTFZWgublBCAp8G&cnr=14&ratebypass=yes&dur=513.486&lmt=1579375889869681&fexp=24001373,24007246&c=WEB&txp=5535432&n=NcdPMFfVtvCiCQ&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhALMRdd7ASygtdWZpBkp3oONGQ90guRutSvmWRPgXUlnAAiBLRF3QJQiJrDOmjflq_wRg2QPP4BM-f_uwlylr8WTMYw%3D%3D&redirect_counter=1&rm=sn-p5qeek7z&req_id=25bfb83afde8a3ee&cms_redirect=yes&ipbypass=yes&mh=hc&mip=14.139.236.98&mm=31&mn=sn-o3o-qxaz&ms=au&mt=1645506522&mv=m&mvi=2&pcm2cms=yes&pl=24&lsparams=ipbypass,mh,mip,mm,mn,ms,mv,mvi,pcm2cms,pl&lsig=AG3C_xAwRQIgSiFyQD7I1ItAVi-a3O4I2WXTfir6o-KkDIXE8SPAqYUCIQDUqt_Sde42YIX_XGKwyCJKEhKfNrJSClxXyA_ZePif0g%3D%3D" download="myvideo "> <img src="/images/myw3schoolsimage.jpg" alt="myvideoimage" width="104" height="142"></a>
As you can see my code. I want that when someone clicks on the image the video get downloaded to the device. I have tried to code but when i click on the image it open a HTML5 video play instead of downloading. Can someone help with this code.
<p>Click on the w3schools logo to download the video :<p><a href="https://rr2---sn-o3o-qxaz.googlevideo.com/videoplayback?expire=1645528580&ei=pHEUYrN02YCHBtf6mIgP&ip=54.85.142.246&id=o-AIfHFv3b9xkFI4jHB2fKmIk540PGChGAN8iEEkLVmN9c&itag=22&source=youtube&requiressl=yes&vprv=1&mime=video%2Fmp4&ns=Uzk-AULVZFTFZWgublBCAp8G&cnr=14&ratebypass=yes&dur=513.486&lmt=1579375889869681&fexp=24001373,24007246&c=WEB&txp=5535432&n=NcdPMFfVtvCiCQ&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhALMRdd7ASygtdWZpBkp3oONGQ90guRutSvmWRPgXUlnAAiBLRF3QJQiJrDOmjflq_wRg2QPP4BM-f_uwlylr8WTMYw%3D%3D&redirect_counter=1&rm=sn-p5qeek7z&req_id=25bfb83afde8a3ee&cms_redirect=yes&ipbypass=yes&mh=hc&mip=14.139.236.98&mm=31&mn=sn-o3o-qxaz&ms=au&mt=1645506522&mv=m&mvi=2&pcm2cms=yes&pl=24&lsparams=ipbypass,mh,mip,mm,mn,ms,mv,mvi,pcm2cms,pl&lsig=AG3C_xAwRQIgSiFyQD7I1ItAVi-a3O4I2WXTfir6o-KkDIXE8SPAqYUCIQDUqt_Sde42YIX_XGKwyCJKEhKfNrJSClxXyA_ZePif0g%3D%3D" download="myvideo "> <img src="/images/myw3schoolsimage.jpg" alt="myvideoimage" width="104" height="142"></a>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论