load different page depending on frame suport - html

I have a simple frameset which works fine and when frames arnt supported it shows a link to the frame free version. What I would like is for the page to redirect to the frame free version if the browser doesn't support frames. I have googled without success and I am sure it can be done but as yet I haven't worked out. Ideas please?

You can use 'Browser Sniffing' and blacklist those without support however this is generally a bad idea.
Also you should avoid using frames are they have been dropped from HTML5 and are an accessibility nightmare
Use either CSS positioning or iframes to achieve similar results

Related

Escaping IE's compatibility mode?

I work for a private company writing web apps. Most of the web apps were written prior to me and require users browsers' to be in compatibility mode (IE8-10).
For my IE10 users, I'd like to start implementing HTML5 features. Given an application that's in compatibility mode and uses frames/framesets, is there a way I can run in compatibility mode for most of the application but escape a frame and have that run using HTML5? Should I not being using frames to achieve this? Would an iframe work?
The HTML5 frame I'm referring to does work, but only when the browser (IE10) is in standards mode.
Thanks.
is there a way I can run in compatibility mode for most of the application but escape a frame and have that run using HTML5?
No, you cannot. A frame will always inherit the parent page's document mode.
Should I not being using frames to achieve this? Would an iframe work?
Ideally you shouldn't be using old-style frames for anything; they've been considered obsolete for a very long time. That's probably outside the scope of this answer though.
But no, switching to an iframe won't make any difference in this context.
Your only options are:
convert the existing code to use standards mode,
convert the new code to use compatibility mode, or
open the HTML5 page in a completely new browser window.
Given those options, I expect you will probably give up and go with option (2) as the easy way out. Or (3) if you really need the new browser features.
But I'd encourage you to consider option (1). It is often a lot less work than you'd think to convert a site to work in newer modes. Do you know what the exact issues are that are holding it back?

Embed a browser window within a Flash movie

My question of the day is: in the same way a UIWebView on XCode behaves, is it possible to embed a website or browser window in an Adobe Flash movie? Like an iframe, but within Flash itself.
Is this even technically possible? Do I even want to attempt this?
Thanks in advance.
The true answer is no.
But there are workarounds, one of them is the Flex Iframe mentioned above.
The workaround is based on a real iFrame rendered by JavaScript above the Flash and smart communication between Flash and that JavaScript.
The big drawback though is the wmode=opaque you have to use in order to enable anything to render above the Flash. There are accessibility issues, performance issues and even stability issues associated with the opaque mode, however sometimes you got to do what you got to do.
Check my question on this topic, especially note the Adobe Flash Player Bug and Issue link, do some investigation first to make sure it won't kill your project.
It would seem that it is possible. I have come across a few examples in the past, but never done it myself.
This link might help you with your research...
http://code.google.com/p/flex-iframe/
as might this, which has an explanation and further links...
http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
I don't know how up to date this content is though.

Does HTML5 audio tag support serving mp3s from another domain?

So I am having a web application with domian "www.example.com" that needs to serve audio from "www.example2.com", but for some reason this is not working (the audio just does not stream)
<audio src="http://www.example2.com/song.mp3" controls preload></audio>
Given that if I put the sound source url directly into the browser the audio will be available
Anyone tried this? thanks
Wa'el
Apparently I cannot vote up CyberK's response (don't have the reputation yet to do so) but I agree with him. You cannot do <audio> or <video> cross-domain. I have tried this exact thing on both Chrome and Firefox. There are more than a couple of articles about this. Finding this out for myself today; not happy with the restriction.
http://www.bluishcoder.co.nz/2008/11/video-audio-and-cross-domain-usage.html
I think HTML5 does not allow you to take a source from another hosting provider / server. Maybe it's limited to your domain but I'm not 100% sure... I do remind that there was a little limitation about this html5 element...
You would need to do some tests but I reckon that it does work, but you may have difficulties with certain actions and queries
Example, you may be able to start/pause/stop but not check the title or the length since that could be a form of XSS
FF and Chrome do not support it, but the IE11 do.
I think W3C should have an solution about cross domain, after all it is a completely reasonable request.

Is there a compatible way to serve videos to mobile devices?

I was wondering how to embed a video on a webpage to have it compatible with mobile devices. I am kinda new to the whole mobileweb. So I set up some testing pages and tried them out with some devices of my friends. Flash is obviously not the way to go. Embed tag neither. html5 video tag neither. I also tried to nest them for fallback compatibility but just didn't get it right.
So I had a look at youtube. They are using rtsp streams and they just let the device handle the rtsp:// links. This seemed to be working everywhere, and I think they do it for a reason. So I had a look at rtsp protocol the possibilities to serve such a stream.
Turned out its really simple and doesn't really differ much from the http protocol. There is e.g. ffserver out there for that.
But every free/os implementation seems to be testing/buggy ...
So I ask you guys. I cant be the first stumbling across this problem.
Isn't there a nice tested way to embed videos with nice compatibility for mobile devices? preferably served from a http source!
looks like html5 is the way to go but important are the correct encoding settings.
h264, baseline 1.3 seems to work fine with iphone4 and android 2.1 ... rest untested.
I've been collection information about mobile compatible video players, you can find it here: http://blog.jsethi.com/media/html5-video-players/
The solution would be to use Kaltura open source platform. If you have have the knowledge to set it up it's the winning solution.
Here is my kaltura running HTML5 with flash fallback. http://cdpn.io/DeKuo
Read more here http://www.kaltura.org/
and here http://html5video.org/
Good Luck !

Is it possible to listen to any kind of internet radio with HTML5 directly?

Is it possible to listen to any kind of internet radio with HTML5 directly? I mean is it posible to play live mp3 streams in HTML5 complaint browsers?
Yes, it is.
Take a look at the former specification of html5:
http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#attr-media-src
There is a huge load of specialities about streaming in html5.
And furthermore, take a look at this:
http://web.psung.name/zeya/ - a whole html5 media server.
EDIT
Actually it's like impossible to stream live media.
It's not that it'll stay impossible, but actually it isn't implemented at all - well none of the today's HTML5 browsers are going to support this in the next month's, because the real "live-stream", as known from flash (or equal) hasn't really been specified by the w3-committee - yet.
2. EDIT
As previous experiments showed, it may be possible to use streams without explicitly implement something specific for them. The "non"-stream way works on both streams and static files.