Is HTML5 developed and documented enough? - javascript

I own a site which offers a Flash based music shopping cart which steams music using RTMP. Mobile devices are getting more and more popular and the exclusion of Flash means they don't support my Flash application. I was wondering if it's possible to create the same kind of Flash widget I have on my site in HTML5 or maybe even JavaScript alone? Is HTML5 developed enough for this kind of system? If possible, would users be able to embed an HTML5 version of our players? Can you stream music via RTMP using anything but Flash?
Thanks for your help

To answer your question YES HTML5 is documented and developed enough but the question that you should be asking is "Is HTML5 supported enough?"
HTML5 is markup AND JavaScript and its not supported in every browser. This is mitigated though by many great JavaScript libraries that will gracefully degrade depending on what browser/device is viewing it.
If you just want to learn more and make a decision for yourself I would suggest reading Dive into HTML5 to figure out what HTML5 is all about and what it offers.

No, you cannot stream music using RTMP in HTML5. However, you can offer music in mp3 and ogg formats. (You'll need to offer both to cover all browsers)
After looking at your site, I would recommend you continue to use flash because HTML5 does not support streaming audio, only audio available to download. While the shopping cart and everything else can mostly be done in HTML5, your users will still need Flash unless you want to allow users to download the music easily.

Related

c# WPF Browser with html5 video and javascript injecting

I'm searching a good webbrowser for my project but I can't find one.
I need html5 video streaming (doesn't work in CefSharp) and
I need javascript injecting (doesn't really work in the normal webbrowser)
Thanks for help
CefSharp is able to play html5 video and audio. And here's the list with all the supported audio and video codecs.
Just because CefSharp doesn't include proprietary Audio and Video codecs, doesn't mean it can't. Due to licensing reasons mentioned here, CefSharp is not including them. You can however build cef and embed your own codecs in it.
You can always grab the code from their GitHub Repository and experiment your self considering this great answer on stackoverflow
Or you can use GeckoFx as suggested on another answer posted on similar question on stackoverflow. Which is isn't really a WPF Control, but you can use it with a WindowsFormsHost.

How to record voice in the client-side without Flash?

We need to capture voice in a web portal. Our contractor developed the whole web portal without using Java Applications, only client-side code, and claims there is no way to capture voice using JavaScript today.
I'm not a Java guy, so I don't have the skills to discuss this, but I'll appreciate any help our folks here in SO can give: if you guys say it can not be done with today technology, so be it...
PS: the solution MUST attend IE, Chrome, Firefox and Safari, for end users, so Canary is out of question for now.
Currently there's no way reliable way to record audio using only HTML5 and JavaScript across browsers.
The only cross browser solution for non Flash recording on desktop browsers in the foreseeable future is the Media Recorder API. It's a recent standard proposal for a JS API who's purpose is to make audio and video recording in the browser very simple. Today it works only in Firefox 27 and only for audio. This article covers the standard in more detail.
If audio recording is important for you today I recommend you check out proven flash solutions like FLVAR or Audior. They work on all browsers, they are reliable and supported. Flash just works and major sites like YouTube and Netflix continue to use it.
The javascript's getUserMedia (getUserMedia on MDN) is a simple way to do this. I suggest you addyosmani's polyfill that has a flash fallback in case the browser doesn't yet support it.

Can SoundManager2 use Flash as a backup for the same sounds if HTML5 is not available?

SoundManager2 seems awesome, but the main reason I'm looking to use something other than solo HTML5 is compatibility. What I would like SM2 to do is use HTML5 audio if available, and fall-back to Flash otherwise (for the same sounds). It seems like it should be able to do it, but I haven't yet figured out how.
For example, I'd create a sound called "moo" and link to the sound file. SM2 would then see if it can play that sound using HTML5. If not, it would load Flash to play the sound instead. From the perspective of my app, I should only request the playback of "moo" and SM2 would take care of making sure it plays.
I suspect it may be necessary for me to generate the audio clips in more than one format (possibly .ogg for HTML5 and MP3 for Flash?). I can do that if needed.
Alternatively, I could have my own JavaScript code to detect if the browser will be able to play sounds using HTML5 and pass a different configuration to SM2, but I'd prefer a cleaner way.
Thanks in advance :-)
yes, SM2 uses a Flash fallback:
Using HTML5 and Flash, SoundManager 2 provides reliable cross-platform
audio under a single JavaScript API
both SM2 and jPlayer will give you want you want, it just boils down to API preference.
generally, i'd choose jPlayer if cross-browser compatibility is crucial to you - SM2 is comparatively new to the world of HTML5 audio.. choose SM2 if you're happy using Flash and want more advanced features like access to the raw samples of the audio (to build a level meter or visualisation).
You should look into jPlayer.
It's what we use for cross-platform support. The documentation can be a little sparse at times, but it's rather useful.

JavaScript and microphone audio stream

Since HTML5 isn't ready yet, and getUserMedia doesn't work in browsers i have tested, I am asking that is there any "wrappers" so I could grap audio stream from microphone and send it to server with Javascript. Similar wrapper has been made with web cameras: (google for a "jquery-webcam-plugin". Two link restriction), but I haven't found any similar things for microphone audio streaming.
Audio can be in any commonly known format.
Flash is not my daily basis, flash tips might not help.
Since Google gears has been deprecated, I think it is not wise to use AudioApi. This is not a good news either, so I am guessing that only choices are Java and Flash.
I will appreciate every hint and tip I get.
I'm not sure what you mean by "Flash is not my daily basis". Your other option is Java, but that's less user-friendly. If you're going to require a plug-in (and you'll have to until getUserMedia() is implemented), you might as well make it Flash.
Here is a project that wraps a simple Flash app with a Javascript API that streams audio via an HTTP post to a web-server of your choice:
https://code.google.com/p/wami-recorder/
It's not ideal, but it works and does not require a clunky Flash Media Server.

Can JS/jQuery interact with audio?

I'm writing a page for a musician and am excited about using the HTML5 <audio> tag to create a custom player. I'd also like to experiment with some kind of visual feedback from the music being played. Are there any JavaScript experiments/libraries/APIs that exploit this idea? Is it even possible?
EDIT: It's indeed possible. Here is an impressive list of apps using the Chrome Web Audio API. I'd still love to see what you've got.
I know it's possible in Firefox
Spectrum Visualization:
http://ajaxian.com/archives/spectrum-visualization-with-the-html5-audio-data-api
Mozilla Audio API:
https://wiki.mozilla.org/Audio_Data_API
But I'm not sure about other browsers... I couldn't find much else on the topic.

Categories