Creating links on a web page that tell a mobile device to play the media such as mp4 rather than download it. (android / iphone) - iphone

Is there a way to specifically format a link on my page to tell a mobile device such as an Android phone or an iPhone that when a user clicks a link to a mp4 file (for example) to go ahead and play it (or ask the user if they want to play it) using their phone media player?
I'm working on a web app with mixed results, most of the times the device just goes straight into download mode, and attempts to save the file to the downloads folder, but what I would like is to make it so the device starts automatically playing the file as soon as possible.
My app is basically a file sharing app that creates qr codes and thus allows you to share media to mobile devices... the thing is, when it comes to video files and maybe images, I want the phone to automatically display the media and not just download it.
Any help would be greatly appreciated. You can see the app here http://scan2see.me

You could always use a <video> tag to make your videos play instead of just linking to them.

FYI iOS devices never download anything, unless jailbroken and with Safari Download Manager plugin (or other one like it) installed. So even if you just link, it will always play. And the reason why all videos play at full screen is because the iOS instantiate Quicktime to play it.

Related

Do i need to write extra code for newly added youtube video in iphone?

I am new in iPhone development. I want to create an app which will show youtube videos those i will upload in my account.
I will have admin panel in my app, from where i could control my videos. Suppose i developed the app and launched on app world.
Now after some time I want to add new videos to my account , should i need to write extra code or it will reflect automatically via used link in iphone app?
Speaking generally, you could have the application find your newest videos released in Youtube and display them in the app. Therefore, you would not need to have any more code.
There would be no code for any video within your app. Instead, have your app get the list of the videos from Youtube and play them.

Is it possible for a web based app to retrive images from an iphone?

I'm creating a website which I would like to be supported on the iphone as well. The site allows users to upload images and manipulate them. On a desktop the user will simply click the upload button to select the file from their computer and upload it to the site. But this will fail on an iphone.
Is there any way for a pure web app which is using php/mysql/js and runs inside the browser to get images from a user's camera roll? Does Apple offer any APIs to make this possible?
No, it's not possible currently - but apparently iOS 6 is going to support image and video uploads from MobileSafari.
(Apart from that, you can ask your users if their device is jailbroken and id so, suggest them downloading Safari Upload Enabler from Cydia).

(iOS) Is there a way for an app to open the iTunes music player app (preferably going straight to the Now Playing screen)?

I would like to be able to launch the iTunes app from my app when I tap a button (note that I mean the actual music player, NOT the iTunes Store or App Store). Preferably I'd like it to go straight to the Now Playing screen. Is there any way to accomplish this?
Yes, it is possible to open the iTunes music player to the "now playing" screen using the music:// URL scheme. Found this out rather incidentally while reading this post on how to quickly launch apps using Siri.
Also, here are a few sites that you might find handy if you ever need to answer the question "Can I open Application X with a url?"
handleOpenURL - a searchable database of iOS apps that accept URLs (and the URL schemes they take). You can submit your apps here.
Adrian Kosmaczewski's Wiki lists quite a few iOS app url schemes as well.
app lookup blog has more.

Force download mp3 for mobile site on iPhone

I'm working on a little mobile site for a musician and they want to be able to let users download a song for free on their mobile device. The problem I'm running into is that in Safari for iPhone the song plays in the browser no matter what and does not get added to the music library.
On Android I've been able to force a download which the user can then add to their music application of choice. I was hoping there was some way to get the song into the iPhone music library with out requiring some additional application or going through iTunes.
Any help would be greatly appreciated. Thanks!
It is not possible to have Mobile Safari download a media file from your site to a device's library. That and many other parts of the iOS filesystem are protected from external access.
Safari on iOS 13 and up finally supports file downloads, just like Android and Chrome.
According to a senior level Apple Support Rep, Apple has coded their OS to specifically prevent any audio file that does not have DRM protection, to be downloaded. This means Apple products will force a file to stream as opposed to downloading the entire file. Finding an official statement from Apple is difficult so the closest I could get was talking to a senior rep. You can, of course, call apple for free support with ANY apple product (including I-tunes on windows lol) by calling 1-800 My Apple. Most likely you can get additional confirmation there.
I actually created a site where if you click on a link with a windows or android device, it forces the download. This doesn't work on Apple devices, it still will only stream. The only real fix for this is to offer the file as a compressed file. (ie. zip) then they could download the compressed file but then they would have to open the .zip up and extract the audio.
Ironically, I'm currently looking into how I can use PHP to "zip" a file up on the server side per client request and then deliver them the file in the compressed format. I stumbled across this post because I was attempting to see if there was a way to fool a system into believing a file was in fact protected when it was not.
Hope this helps.

Is there any way to play video on an iphone from a website, without using youtube or a custom app?

I'd like website viewers to be able to play a video on an iphone, without posting the video to youtube, and without them having to install any iphone apps. Are there any other options here?
If you host a Quicktime movie, it'll play just fine without any additional software. There is a "designing web pages for the iPhone" document somewhere on Apple's web site that gives more detail on supported formats, I think.
just having a link to a quicktime-playable video file works I believe