Anyone have solution to display flash inside Page Tab URL, that works in the newest Chrome? Chrome blocks embedding for security reasons. Console error:
Unsafe JavaScript attempt to access frame with URL https://www.facebook.com/pages/[CUT] from frame with URL https://[PAGE_TAB_URL]. The frame being accessed set 'document.domain' to 'facebook.com', but the frame requesting access did not. Both must set 'document.domain' to the same value to allow access.
I know, that I can display flash in canvas mode (apps.facebook.com/appname), but I want to embed it inside Page Tab.
Well I once had the same problem, I've built a facebook iframe app that would allow users to use the webcam to take a pic and the .swf responsible for using the webcam, always fired that error.
If you embed a youtube video, chrome will fire that error, but the videos still plays, in my case the .swf object just frozen and I was unable to take any pic or even change flash settings.
The solution was to add this .swf after a user action, in this case a click, just try not embedding the flash on the page, and just put a button that will add the embed code after the user clicks on it.
Related
I've created a web langing page using flutter, the page is shown on browser as expected.
Inside the html code, i've added the scripts to integrate screen recording with hotjar and smartlook.
In the smrtlook and the hotjar consoles, i can see the recording of the sessions but, these are complete blank.
All the records are white screens, whith only the tap/click/swipe gestures.
I've added inside the tag in the app html this line
as described (by smartlook) here without solving my problem.
Do i placed this tag in the wrong position?
Does the app needs to be built with renderer canvaskit rather than html?
Is there something else i'm not considering?
Thanks,
I have a native iPhone app, which has a UIWebView component to it. I am trying to see if I can replicate the "Add to Home Screen" button that is present in the tab bar options in Safari.
Is this possible inside a UIWebView within a native app?
Thanks!
Brett
[I presume your question is about replicating the action associated with add to home screen, rather than replicating the appearance of the button itself (which being pedantic is what you actually wrote).]
As others have said this isn't possible.
What you could do is programatically launch Safari from within your app and give it the URL of a page to load which is your page.
When your page is loaded it has some sort of animation and shows the user where the add to home screen button is and tell them to press it after clicking a link which is displayed in your web page. When the users click on the link it takes them to whatever page it is that you would like saved to the desktop, and you hope they follow your instructions.
If you register your app to handle a proprietary url scheme the users can get back to your app from within Safari by clicking on a link using your app's url scheme.
The web pages that you seed Safari with must however be remote pages, you cannot give Safari a page in your app's bundle or that your app has downloaded as Safari cannot read pages from your app's sandbox.
The short answer is no, you can't. Apple does not let you.
Here's a similar question which may help you come up with other possibilities:
Javascript for "Add to Home Screen" on iPhone?
If I had to think of a work around off the top of my head, you could create an javascript pop-up which instructs them how to. It could say something like tap this button to go to mobile safari then tap action -> add to home screen.
Execute the Javascript with UIWebView's method:
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script
Hope this helps.
You can use UIActivityViewController with your url as the activity items
NSArray *activityItems = #[title, url];
And then you can exclude the activities that you don't want. I think it´s the only way for now.
It's easy to detect how a full-screen WebApp (i.e., WebApps that include <meta name="apple-mobile-web-app-capable" content="yes">) was launched – just check window.navigator.standalone
Is it possible to do the same for a non-full screen WebApp?
I want to show the user a "bookmark this web page" bubble (like on http://youtube.com), but I don't want to show it if the web page was launched from the home screen.
I'm pretty sure this is possible since YouTube is a non-full screen WebApp and it doesn't show the "bookmark me!" bubble when its launched from the home screen
I might be missing something in your question, but: window.navigator.standalone is telling if the app is currently in full screen mode or not (if the browser supports this property at all).
That means: if the property is there and it is false, you might want to offer your bookmark button. If it is there and true, don't show it (app is already bein run from home screen). If the property is missing, don't show the bookmark button because the user agent does not support it.
Try to visit www.luscarpa.com for instance. Use Safari and then bookmark it to your home screen and notice the difference.
It also has info about the fullscreen mode (that's where I have learned about it): http://www.luscarpa.com/development/make-your-website-an-iphone-web-application/
Horace, you can study Google's commented javascript source code, which appears they may have used in their YouTube bubble detection scheme, at
http://code.google.com/p/mobile-bookmark-bubble
if ('standalone' in navigator && !navigator.standalone && (/iphone|ipod|ipad/gi).test(navigator.platform) && (/Safari/i).test(navigator.appVersion)) {
document.write('<link rel="stylesheet" href="add2home.css">');
document.write('<script type="application/javascript" src="add2home.js"><\/s' + 'cript>');
}
that's a little script that came from cubiq.org/add-to-home-screen seems to get the job done
of course, if you're not using the add2home script then you should change the filenames.
look at the youtube website url opened in the Safari, in the last part of the url, there has a home/?bmb=1, i think that bmb=1 is actually making the difference, when you bookmark this page, the url will include this bmb variable, then when you press the home web button, on the server side you can detect this and know it is from home web button.
I'm working on a FB canvas app using Flash with 3D graphics.
I must embed my SWF with param wmode="direct".
On FB, when opening FB UI dialog (such as: purchase credits), FB automatically hides (visibility=hidden) the flash, and after dialog closes, FB returns the old visibility value.
On Chrome and Firefox it works, but on IE, after the dialog closes I checked the flash element style and I saw that visibility=visible, but still the flash is still hidden!
Anyone know how to fix this?
Thanks!
Roei
UPDATE: Just for clarify: it works when using wmode is transparent, opaque and window. Just when using "direct" it does not re-appear...
While running a Flash app, if I open a new or existing Facebook chat window, my Flash content disappears. I can continue to hear music playing from the app and when I close/minimize the Facebook chat window, my Flash content reappears. Is this a known issue?
This is happening in Google Chrome 15 and Internet Explorer 9 on Windows 7 with Flash Player 11.
I checked this on my own Flash app as well as on another Flash app made by someone else and the same behaviour is occurring. It does not however hide non-Flash content.
It seems to be a bug with Facebook chat and Flash content.
from http://developers.facebook.com/docs/appsonfacebook/tutorial/:
If you are hosting an Adobe Flash application within Canvas, it is recommended that you set the wmode of the Flash object to "opaque":
...
Other modes (including the default mode, wmode="window", wmode="direct", and wmode="gpu") require us to hide your flash object when dialogs, popups, chat tabs, and ticker flyouts occur. This can be unpleasant or confusing for users.
From the documentation:
If you must use wmode values of window or direct, Canvas will automatically hide and display the Flash object when Dialogs, Ticket flyouts, Chat Tabs and Notifications display.
Developers who wish to provide a custom hide and display experience may pass a JavaScript function in the hideFlashCallback option for FB.init. This function will be executed whenever the Flash object is hidden or displayed due to user behavior (clicking on a Notification, etc.) and can be used by a developer to take the appropriate actions: hiding or displaying their Flash object.
FB.init({
...,
hideFlashCallback: function(params) {
if (params.state == 'opened') {
$('#some-image').show();
FB.Canvas.hideFlashElement(params.elem);
} else {
$('#some-image').hide();
FB.Canvas.showFlashElement(params.elem);
}
});