Currently my iframe is showing the Video/Audio instead of downloading it.
Zip files work fine though.
Thats the code:
<iframe width="0" height="0" frameborder="0" src="https://example.com/downloads/1.mp3"></iframe>
Any Solutions?
if you want to make it download why are you using a iframe? you can simply do this
Download
Related
My problem is, everything is fine opening PDFs using my browsers, until I uploaded a pdf with a form inside. Then, if I embed it, it returns a blank page. But the other pdfs with forms open normally. Please see my code below:
<object data="{{ asset($test->file_path) }}" type="application/pdf" width="100%" height="100%">
<embed src="{{ asset($test->file_path) }}" type='application/pdf'>
<center>
Please click here to view
</center>
</object>
Note: I've also tried to use <iframe> but still returns blank page.
Solution:
option1:
Renamed my file that has # sign. And everything should work fine.
option2:
Use urlencode if needed.
Please click here to view
It's late, and I'm tired, so apologies if I misread the question.
I noticed that the PDF is hosted on a site that doesn't support HTTPS. It showed a blank page if it was embedded on a site using HTTPS, but worked fine when it was using HTTP.
I think you need to either move the PDF to a site that supports HTTPS or make the site hosting the PDF start using HTTPS.
Consider using Objects and Iframes (Rather than Object and Embed)
Something like this should work for you:
<object data="http://foersom.com/net/HowTo/data/OoPdfFormExample.pdf" type="application/pdf" width="100%" height="100%">
<iframe src="http://foersom.com/net/HowTo/data/OoPdfFormExample.pdf" width="100%" height="100%" style="border: none;">
This browser does not support PDFs. Please download the PDF to view it: Download PDF
</iframe>
</object>
This worked when I tested it locally but I can't show JSFiddle since it uses HTTPS.
Also, have a look at these examples: https://pdfobject.com/static.html
Not sure if this will work as I am not able to test your case. You can try this, it always works for me. Try replacing http://yoursite.com/the.pdf with the correct path.
<object data="http://yoursite.com/the.pdf" type="application/pdf" width="750px" height="750px">
<embed src="http://yoursite.com/the.pdf" type="application/pdf">
<p>This browser does not support PDFs. Please download the PDF to view it: Download PDF.</p>
</embed>
</object>
I am very ignorant in this area. I wanted to embed a video in my website. I just went on w3schools and copy-pasted the example code.
<iframe width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1">
</iframe>
Why does the video than not show in the website? I am using Google Chrome.
EDIT:
The problem was that I was using the real youtube address instead the URL for embedding.
it's actually works perfectly, checkout the other code, may be the iframe is hidden by any other controls
The html box embed feature on google sites is great. Google provides a good example of how to build a 3-slide carousel with text or logos for content. However, I'm struggling with how to add youtube videos to the content.
I've tried putting this in the content section:
iframe width="420" height="315" src="https://www.youtube.com/embed/ski_4N0dfFI" frameborder="0" allowfullscreen>/iframe
but google sites complains that the src tag is not allowed here. I suspect this is some sort of security restriction.
Just try.
<object data="https://www.youtube.com/embed/ski_4N0dfFI">
Cannot load video.
</object>
Or
<embed src="https://www.youtube.com/embed/ski_4N0dfFI">
<center>
<iframe width="420" height="315" src="//www.youtube.com/embed/BrI7VRfqgo4" frameborder="0" allowfullscreen></iframe>
I know its been posted around, but nothing's been working for me at the moment. I have HTML website and trying to put the html video youtube embed code, but its not working for me.
My site is online, very simple html.. And it has http in the video embed code as well..
I tried a lot, but cant get it working in any way.
Regards
You have to enable embedding first before the embed code will work from other websites.
Log in to https://www.youtube.com/my_videos?o=U
Click Edit on the video you want to embed
Click on Advanced Settings in the tab below
Click Allow Embedding to enable it under the Distribution options section.
Click Save Changes to save the new configuration.
Now your embed link is ready to be embedded on other websites!
<p align="left">
<object height="385" width="640">
<embed src="http://www.youtube.com/v/LsEU_93SC4c&rel=0?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="385" width="640">
</object>
</p>
Change the third line to your video number/name.
I don'tknow it it can be of any help.
I needed just the audio, so I changed height to "0" and width to"0" and it works on IE and Firefox.
It doesn't work with Chrome and Opera.
Here the simple link.
Just insert it as it is. I inserted it at the bottom of the page before
or go to my age and see if how it works:
https://www.carniaexpress.com/friuli-per-gruppi/raduno-alpini-triveneto-tolmezzo
If you wish to see the video just change height and width...
i am trying to embed vlc player in a web page. what is the best way to do it.
actually i have to stream a video file using vlc and show it on the web page so that
other users logging to my site could see that video.
i have tried various snippts but unable to embed it. any help will be greatly appreciated.
Thanks
HTML way, make sure when u install VLC, u install Mozilla plug-in or ActiveX control stuff for (FF, IE or Chrome)
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="100%" height="100%" id="vlc" loop="yes" autoplay="yes" target="http://10.1.2.201:8000/"></embed>