How can I show image from camera directory on img element with PhoneGap - html

What I exactly need is to load and show images from a location external to the application's. As the photos are constantly changing my proposal was to load them from the Camera Directory so that it's as simply as storing in that folder the images.
The specific need here is:
How can I load and show on an img tag element an image from the camera directory?

Raymond Camden has very good tutorials on some basic uses and some cool features that a developer can use with PhoneGap. In your case, he has a tutorial that semi-relates to you question. He gives the sourcecode with the tutorial so I'm sure you'll be able to extrapolate from there. Basically it's a little Diary app that you can add a picture to. I'm sure you'll be interested in the picture part of the app.

Related

How to pull image from web using its source

I've just started learning how to code starting with HTML. I'm using Codepen and when I add any image it refuses to populate. I can see on the page where it shows my alt text and the image load fail icon, so I'm confident I've coded it correctly. Can you not just pull any image off the web using it's source? Is there some library of widely available images that I can use? Just a little confused.
In response to your doubts
Can you not just pull any image off the web using it's source?
If it is possible to locate images directly from the internet, but you have to be careful to have the consent for the use of it
Is there some library of widely available images that I can use?
There are several portals where to locate images of different categories, some images are paid, others are free, to mention one you have pexels.com,
Next I leave you an example of the code looking for an image in this portal
<img
src = "https://images.pexels.com/photos/374631/pexels-photo-374631.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
alt = "Image"
width = '250px'
>
I hope I have been able to help you
Best regards

I am developing a webpage on codepen and would like to include an image stored on my device on my webpage. What do I put as the image source?

The image is in a folder "more" which is in a folder "Pictures" which is in "My PC".
Hello and welcome to StackOverflow!
You would need to upload this picture to Codepen, so Codepen can actually access this picture even if your Computer is shut down. Unfortunately, this is a pro feature (bottom-left corner -> "Assets")
Using a free Webspace:
However, there are many websites online that provide a free webspace, where you can upload your html, css, images, php files and more and often you also get your own subdomain (like mywebsite.webhost.com).
From the top of my head I only know bplaced.net but feel free to search around.
Using an image hoster:
If you want to stay with Codepen and the nice IDE you can look out for an Image Hoster where you can upload your file and get a direct link to the image which you can then use on your codepen.
You can download xampp or wampp (if you are on windows) or there are plugins for VSCode to mimic a quck http server. You can do everything on your machine.
You can upload files in your system to codepen in assests (pro feature). or you can use their own free design asstes

Can I embed an A-Frame scene into Squarespace?

I want to embed this a-frame project to my portfolio on Squarespace (most basic plan) like what a-frame shows in their embedded page but I'm not even sure if it's possible? I'm also super new to coding so let me know if I should provide more info. If people can also explain things in baby language that would be awesome thanks
embedding remote a-scene?
if you want to link your existing project to a different page then... I don't think it's possible. Look:
the documentation page uses a real a-scene there, with a-boxes and stuff.
It may be possible via iframes but I don't know if it works. There is something like this in the documentation:
For now, if the I-Frame is not on the same origin as the page, the WebVR polyfill for mobile won’t work and there won’t be any tracked rotation of the device. - source
embedded
embedded is used to create a smaller window of a-scene inside a standard HTML page. As far as I know, it just sets or changes some CSS values. Unfortunately, there is nothing like a magical src attribute that would allow you to fetch a different scene from another page
If you can upload a static HTML file onto Squarespace then by all means you can embed it there. But remember that
Only one <a-scene> can exist on a page - same source
You would need to copy your entire project a-scene and paste it into your Squarespace page. Add A-Frame script in header or link a js file and all standard stuff.
link
this may not be what you are looking for but you could potentially create an embeded a-frame scene that would have a link inisde that would "teleport" you (change location) to your project. link - A-Frame

whats the best route to add graphic assets to a google web app script? [duplicate]

I have a webpage that has an image that is stored in google drive, and using the google drive embed code results in this-
and I want to include this image in my website without the border and tools, making it look like this-
Adding the image file to my project is not an option, as I am using google apps script as web domain as I am not old enough to have a credit card to purchase REAL web domain, and I am broke and cannot simply rake leaves or shovel driveways because of COVID. so I cannot add the image file to my project, any advice?
Answer:
Instead of the embed code, use the view link.
Example:
<img src="https://drive.google.com/uc?export=view&id=FILE_ID_HERE">
This solution is a little bit ironic. The tool that stack overflow uses for images can be used for anything else, so I just had to right-click on the image in this question, click on 'copy image URL' then put it in my website and I got a working image!

Do not show the URL in page source

I have some copyrighted audio files that I would like to protect from download, but show them on the website(drupal).
I have a player that works with flash and css on a link, but if you view the page source the href of the link is visible, and it is very easy to get the URL and get the files locally.
I understand that it's not possible to prevent it 100%, but what I would like to do is just to make it more difficult than seeing the url in the page source.
How can I do it?
I would like to avoid to write myself a player, because my flash knowledge is quite limited...
I'm already hidding with Javascript the link while hoovering with the mouse of the player(which is acctually a link in terms of HTML).
I've tried an HTML obfuscator(http://htmlobfuscator.com), but it does not work properly, for one link it works, for the second and third one it doesn't...
Many thanks
Ultimately, any file which is simply embedded has to be downloaded to the user's computer in order to be played (usually it is downloaded to a temporary location then removed, but a savvy user will be able to capture the download and save it.
If you want any real protection, you'll have to use a streaming server like Helix Streaming Server. With these, the file is not downloaded by default and the user's only real capture option is an audio cable from LineOut to LineIn. Most don't have access to this.