Modernizr Browser Feature Detection and Flash Fallback - html

I have built an HTML5 creative that will be served via the Google Doubleclick environment. It utilizes CSS3 transforms / 3d animations etc. that aren't supported by IE8/9/10.
I would like to use Modernizr and checked the documentation but couldn't find any info as to how to reference an independent Flash(swf) file as a fallback. I don't mean within the same html document - like when you would hide or display a div, depending on what the browser supports, but instead just having a separate Flash file served?
Ideally I would just upload the swf, along all other HTML5 files into the same directory within the Doubleclick Studio environment, reference the swf via relative path and then have it served to IE8/9/10.
Any suggestions are welcome.
Thanks!

check out the latest version of yepnope, which is what powered Modernizr.load

Related

embed pdf in html: difference between gview and simple iframe

in this video they recommend using an iframe that calls the GView (google viewer). Is it of any use? Can't you simply reference the pdf in the iframe? what's the benefit of adding the GView?
https://www.youtube.com/watch?v=visxQbQIySg
Most of browsers are expected to manipulate standard web extension such HTML,CSS,JS etc. however they may optionaly support non-web extension (as well as PDF,SWF etc.).
If you push a PDF directly to the browser and the browser does not support PDF extension the file will be downloaded and no defference if you push it inisde an iframe. When you use GView or other Document Viewers they convert the target file to HTML tags or other supported formats for all browsers (like canvas) and so you make sure that the file will be displayed on screen rather than being downloaded. Also they have extra tools like zooming, paging etc. that improves the user experience.

TideSDK Namespace (Application ID)

I have an app that functions perfectly outside of Tide. The app uses Flowplayer to load and play a video using HTML5. It appears that when Flowplayer insert the video tag and sets the src attributes, the path is prefaced by the namespace (application id) used in my app configuration. Is there a way to disable this?
Everything in my app is inside the resources folder so there is no need to include the application name in the path.
Thanks,
H
#Ward Where we left TideSDK, unfortunately it did not have support for audio/video tags in HTML5. The HTML parser within the webkit in that code does not handle this properly. We decided more than a year ago to put our energy into a broader effort for mobile, web, and desktop called TideKit that is due to be released shortly. http://youtu.be/aE7gN-d0GhU
HTML5 support is state-of-the-art including audio/video so embedding is just as easy as using the tags. Working with anything HTML5 or creating apps with native capabilities and UI will be easier and better than ever. TideKit will launch with a CLI and an app to connect with our build service to optimize build's based for your app's requirements (and where you want it to go). Any code you have in TideSDK can be migrated easily.

Using phonegap and html5 video tag: caveats?

I am planning to build a JavaScript/HTML5 app, and wrap it with phonegap to be installed on an android tablet.
In it, I want to show a video file.
Is it just a matter of creating an index.html file, and putting a mymov.ogv file in the same directory, and then using:
<video src="mymov.ogv"...>
and it will work on Android?
I have read about some problems with this, but my quest got me confused.
What are the caveats, if any?
PS: the video should be packaged within phonegap, such that the video is shown when the app is not connected to wifi. So it's a local file.
PPS: Since it's for internal use, I am able to choose a particular modern android version (if that makes any difference). There is no need to support old android versions whatsoever.
According to this resource: http://caniuse.com/ogv There is not support for ogv format in Android. Remember that Phonegap applications are just display in a rapped browser window-- So if the browser doesn't support it, you can't use it. Whether the video is on-board the device or streamed, doesn't matter.
You can certainly embed with the tag, but you might want to use the associated Javascript API to provide some control over the video.

How to play a midi file in html

how can I play a midi file in my html/php page
Right now I surf the net and got lots of simple embed code like the one I given below
<EMBED SRC="C:\Windows\Media\Onestop.mid" hidden=true autostart=true loop=1>
But my firefox says to install plugin - Quicktime player
I dont think this is the way or how to bypass this above said issue, may be if you can suggest another method to do this if any,
thanks...
I know it's been a while, but this is top of Google for "website midi player", so I thought I'd drop in a solution.
I made a website and wanted to play a midi file, and there's a Javascript plugin you can use: http://www.midijs.net/
Just include the library:
<script src='http://www.midijs.net/lib/midi.js'></script>
And then the file you want to play: <script>MIDIjs.play('path/to.your/file.mid');</script>
Important edit
It seems that the remote file is doing Crypto mining, which is less than ideal. You should either store the file locally and remove t("https://coinhive.com/lib/coinhive.min.js",D), or use the original code from GitHub: https://github.com/babelsberg/babelsberg-js/tree/master/midijs
Thanks to #David de Kleer for pointing that out.
Use Web Audio API for modern browsers. See complete example of player. It works on desktop and mobile.
With html-midi-player, it is possible to embed a MIDI file in a website simply by inserting a midi-player element (a custom HTML element which works a lot like the audio element, but for MIDI files):
<midi-player src="jazz.mid" sound-font></midi-player>
Complete demo:
<midi-player src="https://cdn.jsdelivr.net/gh/cifkao/html-midi-player#2b12128/jazz.mid" sound-font>
</midi-player>
<!-- The following needs to be inserted somewhere on the page for the player(s) to work. -->
<script src="https://cdn.jsdelivr.net/combine/npm/tone#14.7.58,npm/#magenta/music#1.22.1/es6/core.js,npm/focus-visible#5,npm/html-midi-player#1.4.0"></script>
Full disclosure: I'm the author of html-midi-player.
The playback functionality is provided by Google's Magenta.js library. It's also possible to use Magenta.js directly to play MIDI files, but this requires a non-trivial amount of JavaScript coding, which is why I created html-midi-player.
As far as I know, there is no cross-browser way to do this: Flash, the most common option when embedding audio on a web page, doesn't play Midi files.
The only way is indeed the embed method, and whether that works will depend on how the user's browser is set up. A plug-in (like Quicktime) will have to be installed that can handle the file. If the "install plugin" dialog appears on a computer, it won't work there.
I think the only sane way is to convert those Midis to MP3 files.
Java can play MIDI files, and the necessary plugin is installed (in the factory) on most PCs
Incomplete examples here and here

How to embed a wave file in html (cross platform)

I want to embed a wave file (or mp3) in html. There is no problem for windows platforms. User can install a windows media player plugin. But WMP does not support linux. Is there any way to do that besides using Flash?
You can take a look to a Javascript implemtation (origanilly from Digital Medias).
Here is a demo
But depending on what you want to do, it's generally not a good idea to provide music on website...
What do you mean by "embed a wave file in html"? You want to play an external file of hold that file inline in the html?
I do belive that you want to play an external file, as holding that file inline would be an overkill.
So, to play an external file, why not use a flash player (http://developer.longtailvideo.com/trac) or the new HTML5 element (http://ajaxian.com/archives/its-friday-play-some-drums-html5-style) ? I do belive flash is more lightweight than WMP and is cross-platform.
WMP might not exist on linux, but there are packages available for Firefox on linux that installs avi and mp3 handlers (at least mplayer does this, don't know about other players)
Really nice and easy example published by Google :
http://code.google.com/intl/fr/apis/wave/embed/guide.html
w3schools will usually tell you all you need to know about html authoring