This question already has answers here:
Prevent HTML5 video from being downloaded (right-click saved)?
(28 answers)
Closed 5 years ago.
What is the best way to make it harder for the user to download videos from my website?. I know it is impossible to prevent it at all. But I just want to make it more difficult than just secondary click, save as. I'm rendering as html5 video tag. I'm using to remove download button from controls. But still can save the video using secondary click and save video as. There is an effective way to make it a little bit difficult to the user from downloading videos from my website?.
This question where answered before but I post here the solution that I got from Clayton Graul here :)
This is a simple solution for those wishing to simply remove the right-click "save" option from the html5 videos
$(document).ready(function(){
$('#videoElementID').bind('contextmenu',function() { return false; });
});
Related
This question already has answers here:
What is the best way to embed Youtube videos? [closed]
(2 answers)
Closed 2 years ago.
I am still pretty new to web developing and i am trying to create a new website for fun and just to test my skills so forget me if i m asking alot from this platform.
but i wanna add a youtube video to my webpage and i can't find anything on stack overflow regarding this but can anyone show me a platform where i can copy/paste the code or someone provide me with it again sorry if asking a lot i have tried github,stack overflow and tried finding on google but everything is related to something else :( any help would be apreciated thank you in advance
You can embed the video on your page using <iframe>. You can find instructions here.
The embed code can easily be found by clicking share button on any YouTube video.
If you're using HTML5, the best way to achieve this is by using the <iframe> tag.
Here is an example (you'll find some stupid dolls jumping and moving):
<iframe src="https://www.youtube.com/embed/tgbNymZ7vqY"></iframe>
autoplay=1 will make the video playing when the page is loaded:
<iframe src="https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1"></iframe>
But there are two deprecated tags in HTML, I don't recommend to use them.
They are <object> and <embed>.
An example of using <object>:
<object data="https://www.youtube.com/embed/tgbNymZ7vqY"></object>
Another example if using <embed>:
<embed src="https://www.youtube.com/embed/tgbNymZ7vqY">
This question already has an answer here:
Modify default HTML5 video controls
(1 answer)
Closed 6 years ago.
I noticed that in new version of Chrome browser (55.x) the audio player (HTML<audio>) has download button. I see this button in Chrome only and I can't find anything about how to turn it off.
Code:
<audio src="audioUrl.mp3" controls=""></audio>
Ideally I'd like to hide this button but if hiding button is not possible I'd like to prevent downloading file when button pressed. I couldn't find any ondownload event where I could do such thing.
Any help will be appreciated.
"In reality, you can't. But you can make it harder to download."
The full response is here: Prevent HTML5 video from being downloaded (right-click saved)?
This question already has an answer here:
"Autoplay" HTML5 audio player on mobile browsers
(1 answer)
Closed 6 years ago.
I have created a webpage using html and css, I wanted to start an audio file in the background automatically once the page is loaded. Thus I have used <audio> tag in my code.
Now, this works perfectly fine when I open my page in my desktop, but when I open same page through mobile's browser, audio does not starts automatically. It requires manual option.
Can anyone provide me with the solution?
Most of the mobile browsers don't support audio autoplay to save mobile bandwidth on behalf of the user! The similar issue already discussed before, but i have something to share with you which may help you out.
Chrome does not allow applications to play HTML5 audio
after googlling little bit i found an article on codeproject which is really helpful in your case. here is the link.
Fix autoplay issue in mobile browser
i hope it will help you to come out from trouble, thanks.
This question already has answers here:
Disable "save image" in iOS web application
(4 answers)
Closed 6 years ago.
I am trying to disable the "save image" dialoge from showing on the iPhone/any iOS device. When a user is in Safari they can hold their finger down on an image and they can save that image directly to their phone. Is their a way to diable this menu with javascript, jquery, or css?
I have looked around at other posts and there does not seem to be that much on this topic. I found one post but the answer did not seem to work.
I saw one method of using an invisible div but I prefer not to do this if it can be done with jQuery or javascript.
Thanks
Have you tried -webkit-user-select:none; and/or -webkit-touch-callout:none;?
You might be looking for: -webkit-touch-callout
-webkit-touch-callout
This might be helpful: http://css-infos.net/properties/webkit
Does anybody know a way to detect is a video playing on a web page or not using javascript. For flash video.
Thanks.
Your question isn't very clear on what exactly you are trying to do. What do you mean by 'or not using javascript'?
Here are a couple of other questions which may have info to help:
Detect if HTML5 Video element is playing