Resizing of AS-based Flash app from FireFox vs. IE - javascript

I have put in some controls to allow users to resize my Flash app via Javascript:
document.getElementById("flashApp").height*=1.25;
document.getElementById("flashApp").width*=1.25;
This works great in IE/Safari, but is ignored in Firefox. I know it's talking the the flash app and gets and sets the height/width vars ok, but the same code run in FireFox ignores the scaling. (It's not the DOC spec issue)
Any thoughts?
Bill

Make sure you've got flashApp set in both embed and object tags. One browser might look for the id in the embed tag, while another uses object.

Related

Chrome PDF viewer malfunctioning when extension in started

I have a chrome extension which allows to write on screen in chrome tabs. The default behaviour looks like :
It works be simply inserting a canvas tag in the DOM and doing all the stuff in it. It works well in all sites. However, chrome PDF viewer behaves strangely when I use it :
Before -
After -
I don't think there is any issue with the extension because it works on all other sites. I think there is an issue with chrome PDF viewer itself.
I can attach the code here if asked in comments.
Ok, so I tried to replace all innerHTML += <value>; by insertAdjacentHTML("afterbegin",<value>); And now it's working fine.
It's because your canvas must be on top to ensure it will works on every website.
The z-index propery is not enough for that.
Hope that helped !

Flash fallback for jplayer won't work in chrome because "Invisible [Flash] content is always blocked."

So I have to use the Flash fallback for Jplayer when the user is using Google Chrome because of the way our audio streaming server is set up (HTML5 just doesn't play nicely with our Streaming Audio Icecast server for some reason, live streams are fine but static mp3s are not). All other browsers are fine!
However, it keeps blocking the player even if the site is selected to always play the flash plugin, and now it's printing this error in the console: "Same-origin plugin content from http://kansaspublicradio.org/widgets/audio-popup/jplayer/Jplayer.swf must have a visible size larger than 6 x 6 pixels, or it will be blocked. Invisible content is always blocked."
What's the best/easiest way to make the Flash player not be invisible?
Jplayer uses HTML elements for the controls. It's not like your typical Flash game or animation or anything, the Flash part is just used to play audio (when HTML5 isn't being uses).
Thanks for any help! I'm also aware that Flash is going away in a few years, hopefully we have a more ideal solution figured out by then.
Open jquery.jplayer.js or jquery.jplayer.min.js and find setAttribute("width". Here you can adjust the width and height of the loaded player. Setting this to something above 6x6 should fix your issue.
Unfortunately the official jPlayer project is no longer maintained and pull requests are ignored, so you'll have to do this manually.

Omniture / Adobe Analytics tracking breaks external links in Safari

The Omniture tracking code is breaking all external links on our site in desktop and mobile Safari. When we click or tap on any link with an href outside our own domain, Safari won't open the page requested - or it does once, but then not again. Here's a very basic example of the kind of link that breaks:
Test
This is a weird bug that only affects Safari. We know it's the Omniture code because the links start working as soon as we comment out the link to the SiteCatalyst JS file, or when we set the s.trackExternalLinks option in the Omniture config to false.
SiteCatalyst has a linkInternalFilters variable where we set the domain of our site: a function called s.exitLinkHandler uses this. We thought it might be the source of the issue, but even when we redefine it as an empty function our external links are still blocked.
Has anyone else come across this crazy problem? We can work around it for the moment by removing the href attributes of external links and handling clicks callbacks that use window.open, but it's a total pain that normal external links on our site now don't work on iPads, iPhones and desktop Safari.
(We're using version H.25.2.05feb2013 of SiteCatalyst.)
Looks like you'll simply want to update your H code. There are several link tracking issues resolved in later code versions:
http://microsite.omniture.com/t2/help/en_US/sc/appmeasurement/release/index.html#JavaScript_H_code_Legacy
If you're using manual link tracking, you'll also want to slightly modify your implementation to accommodate recent browser updates:
http://microsite.omniture.com/t2/help/en_US/sc/implement/index.html#Manual_Link_Tracking_Using_Custom_Link_Code

Javascript caching on iPad HTML5 fullscreen web application

I'm having an problem where the iPad insists on loading an old copy of a .js file, instead of the current one. Strangely enough, this only happens when the page is in fullscreen mode, not when it's being run from the page.
I'm not using any kind of cache manifest;
When I open the page on Safari, it behaves as dictated by the latest version of the .js;
When I open the page through the icon, it behaves as dictated by the old .js;
Killing the running application, deleting the icon and then creating it again doesn't solve the problem; it's still using the old .js, even while in full screen.
Does anyone have an idea of what's going on?
-- update --
This seems to be an iOS 5 bug.
-- Workaround (a.k.a. ugly hack) --
Simply add some fake http params to the script tag, so that the cache thinks it's entirely another JS:
<script src="js/pentaho-jqm-repository.js"></script>
Becomes:
<script src="js/pentaho-jqm-repository.js?fkn-ios-bug=1"></script>
After using the aforementioned workaround (adding a fake parameter to the URL) and then changing it back, strangely enough, the problem stopped happening. Of course, in a production environment, one wouldn't be able to do this, so I think I'll just start numbering the js versions so that the end user won't have this problem.

How do I embed a flash SWF file and get around the IE security layer without using swfobject (to keep down file size)

I'm looking for a way to embed an SWF into a page and get around the Internet Explorer security issue (where it requires an extra click to "activate" the flash file).
I've got my code working with swfobject, but I'm using this in an embedded widget context (eg a clickable banner ad) so I am really trying to keep my file size down, and swfobject adds about 10k worth of minified Javascript that just feels like more than I need
I just need basic flash rendering, I'm not really that worried about Flash version detection (I'm using an old enough version of Flash for the SWF) though a fallback solution if flash is not available would be nice.
Finally, this has to be something that can work entirely from a single Javascript file included somewhere in the BODY tag of the containing page. (The reason I say this is because I had some issues even with the swfobject version when I was document.write'ing a SCRIPT tag for the swfobject.js into the BODY of the page instead of the HEAD).
I hope that makes sense, I can clarify if needed.
Thanks in advance!!
"Click to activate" is no longer an issue, see this note.

Categories

Resources