I am developing an app that use UIWebView to display a list of videos from youtube.
For playing the videos I use the youtube embed feature and it open the youtube application when the user clicks the video thumbnail - works great.
I want the same functionality to be executed when I click a "Watch Now" button that will be located near the youtube thumbnail on my web view but when I try to use "href" to the youtube video it opens the "youtube play page" and not the youtube iPhone application like in the embed way...
Any ideas?
Netanel.
I've created a test project with following code executed:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://www.youtube.com/watch?v=5ra01Bqef7A"]];
Running the project in Simulator allowed to reproduced the issue you've stumbled upon: test app launched Safari and it simply opened the Youtube video's page. But when I ran the same project on an iPhone the result was different: it launched the Youtube app and it started lading/playing the video in the URL right away.
The reason why the same code behaves itself differently is that there's no Youtube app in Simulator, so the only URL handler available in its environment is Safari. So everything's working as it should, you can continue developing your app.
BTW here's a really nice official blog post from Youtube about integrating it with iPhone apps: YouTube APIs + iPhone = Cool mobile apps
Related
I wish to play flash content in iPad app so i searched lot then finally i came to know Puffin browser will play flash content.
In my app when user tapping a button the app redirected to puffin browser then it will play the flash content. then again if try to re-open my app from puffin browser i could not re-open it.
I created URL Scheme for my app. after completion of flash video, i tried to open my app by using myApp:// in puffin browser but it does not re-open my app. if try same way in safari its working.
Please help me
External URL opening will be supported in the next version. Do you mean you want to manually type "MyApp://SomeUrl" in Puffin and then open MyApp with SomeUrl? Is your app free to download? I'd like to give it a trial.
ps: I work in CloudMosa which sells Puffin.
Maybe a bit late, but there a several documentated URL Schemes on the Puffin Developer Page: https://www.puffinbrowser.com/development/
Puffin Browser for iOS handles the following URL Schemes.
puffin for http
puffins for https
puffin-x-callback for callbacks back to calling app (iOS after version 3.5)
i.E. use instead of https://www.google.de the Url puffins://www.google.de to open https://www.google.de in the Puffin Browser.
Unfortunately currently workin only for the not longer maintained iOS Versions Puffin and Puffin Pro. The new browser Puffin Lite has afaik no documentated URL Schemes or does it?
I've made an app for a client that uploads a vide to youtube and then emails them a link to a page that, when opened on Safari, displays the video and then prompts them to add the page to their homescreen as a web app.
For some reason, when the app is played in Safari the video plays fine but when it is played from homescreen it doesn't play sound through the speakers, only through the headphones. Anyone know of a reason this could be happening?
EDIT: Fixed it myself and posted to another answer
http://www.shockoe.com/blog/embedded-youtube-videos-wont-play-sound-through-speakers-when-played-from-web-apps-added-to-homescreen-fix/
Answered my own question! Need to use Object embed not iframe
http://www.shockoe.com/blog/embedded-youtube-videos-wont-play-sound-through-speakers-when-played-from-web-apps-added-to-homescreen-fix/
I'm trying to set a QR code link that showing me a photo uploaded into a new album in Facebook by a remote script.
I saw this page: AKOSMA
I then added fb://photo/id to my qrcode generator script
On Android, the URL works!
on iPhone it loads the Facebook app and loads a white page with no photos.
What URL am I supposed to use?
I tried some other URLs that I read about in the link above, but it doesn't work.
Unfortunately it doesn't seem it's possible. I tried in may ways!
At the moment I am linking to the photo in mobile Safari: #"http://www.facebook.com/photo.php?fbid=%#"
I am using Xcode to develop an iOS app and I need to know how to link a website to a button to open with in the app. I want o have a drop down bar that has buttons to return to a separate screen and a button to save the link to another place. Is there a way to open a website or a link to safari with my app?
You can open a website directly by using a UIWebView object in your app.
You can get Safari to open a web site by invoking something like [[UIApplication sharedApplication] openURL:myURL].
I think the answer to this is probably no, as I have been searching for days and have not run across the answer. I have a mobile site that has links to youtube videos in http://www.youtube.com/watch?v=XXXXXXXXX format. The links open in the iPhone Youtube app which takes the user out of Safari and is a suboptimal experience, as the user then has to re-open safari. Is there any type of parameter to pass that would allow these video links to open in the same view that say an embedded video opens in, or a direct MP4 would open in(which allows the user to simply click done, and boom they are back on Safari)? It sucks that only iframe or embedded videos seem to allow this functionality and not links.
From messing around with the mobile Youtube site itself, it looks like you can link to the mobile page for a particular video with this URL format: http://m.youtube.com/#/watch?v=XXXXXXXXX. Visiting that URL will show the video page in Safari without launching the Youtube app.
For me this solution is pretty simple but elegant and it did work perfectly
https://github.com/hellozimi/HCYoutubeParser