I'm playing around with HTML5 videos and front end work. I'm wondering, why use JWPlayer or any other plugin instead of (extensively) creating your own? Other than it being less work.
Browsers, devices, advertising standards, etc are constantly changing, making it essentially impossible to responsibly keep up with the rapidly moving market AND continue to develop on top of the player (which, if you look at building a player from a macro perspective, is where the work really begins).
In short, using a product like JW Player gives you all of those benefits on top of the <video> tag without requiring you to become an expert in video engineering.
Related
I've been doing screen reader optimization for the last 2 years without issue, but now I'm developing an application that has audio playback as a core piece of functionality. As I understand, there's no way to defer playback while a screen reader is running and all of my audio streams are talking over each other right now. I've been through the WAI-ARIA specs many times to the point that I doubt the feature I'm looking for is included there.
Is there any overall screen reader API accessible by JavaScript that would allow me to coordinate my applications audio to not overlap with accessibility devices? Something where I can just listen to a callback or subscribe to an event—something like window.addEventListener('screenReaderAudioFinished', handlerFn); ?
TL;DR I'm looking for some way in JavaScript to be notified when a screen reader is finished speaking. Callbacks, events, anything.
TL;DR What you are looking for does not exist in the browser
Sound like you are developing a game, If that is true, then what you could do is completely take over the announcements that are happening - essentially implementing your own screen reader. This could be achieved by implementing an application region with a virtual "cursor" on the controls manipulated by the keyboard. This calendar widget shows how this can be achieved for both keyboard and gesture control.
http://dylanb.github.io/datepicker/datepicker.html
Audio output could be implemented through your own audio pipeline. If you have the ability to play audio, then writing this should be reasonably trivial but mixing choices and priorities might be the hard part.
You should not only be announcing the controls a user moves to when they move to different controls, but you should also have an "audio description" track that describes what is happening in the animations if these are important.
How you mix the sounds depends on what is most important at any given time and whether there is any "real-time" component to the user's interactions with the game.
You have to read audio control part of the WCAG (http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-dis-audio.html)
In fact, what you want is quite the opposite of what a people with disabilities would want.
What is needed is to be able to stop the audio in your application, and to start it again on demand.
What I would do is giving a control to pause the audio in your application, giving the user the ability to know that your application want to tell him something with a little beep (<3s) when audio mode is turned off.
Screenreaders are not fully integrated with browsers, so it's quite difficult to find a better solution if you want to have full support of accessibility devices.
I was reading html5 video tutorial which suggested to use some player for html5 <video> tag such as JW player, Projektor, videojs, etc.
I know even if I don't use a player such as these, a player is drawn (in supported browsers) when using <video> tag.
So what exactly is difference between or pros and cons of third party player (for example videojs player) over native html5 player ?
The promise of HTML5 video at least to me, is avoiding all this horrible Flash setup and Javascript, and making the browser do all the heavy lifting.
Unfortunately using something simple like:
<video controls src="http://static.natalian.org/2012-01-18/MVI_0123.ogg" />
Is not enough. You are missing features like hooking into the fullscreen API which is different across browsers and hence you probably need to rely on these 3rd party libraries to take away the pain.
One obvious one is that you'll have more control over how it looks--you'll be able to have it match your site's design.
Also, it makes sure your site looks consistent in different browsers.
The only reason I could think of is UI consistency across browsers. Every browser implements their video player differently so something like JW Player makes it look and feel the same.
I've been working at a startup for some time and nearly have a product ready to ship for a certain platform that's a very high quality html5 javascript game. Everything was made in html5 from using canvas and even the audio+video elements. Now after we sent in our product for review they responded by telling us that the audio wasn't finished yet on their end and to convert our audio to swf and use flash for it instead.
The problem is I'm not a flash developer, I've never touched flash and only worked in javascript and we're already behind schedule. I don't have the slightest clue how I'd go about using swf files to play audio in a non obtrusive manner for an action game. Especially since our game is no simple game with a simple sound track. There's several tracks of audio an opening video, and dozens of sound effects for weapon clashes and such.
Is there anyone that can give me some tips or share some links on how I could go about using swf for audio for lots and lots of sounds without it making a mess of things and the dom?
Thanks alot
This post should help you with calling flash functions from javascript. http://painteddigital.com/2008/calling-flash-as3-functions-from-javascript/ Pretty easy.
Playing audio from flash is very simple too. Just take a look at the documentation for the Sound class.
There is a program at enounce.com that it will increase the play speed of a video in a browser. I think that 95% of videos on the internet run on flash therefore this tool can be useful. I am wondering how that program was created. Maybe they modify the html source in the browser? perhaps it looks for the swf video playing on your browser and it injects some JavaScript on that html element to increase the speed. I been researching on Google and I think it is possible to alter the playback speed of a video with JavaScript. If it is not modifying the html page then it will be nice to at least know how this can be achieved. Also if a video plays on your browser it has to be saved somewhere in your computer I believe. That's why you can seek back and forth once the video finished downloading. why is it that it is almost impossible to find it and the only way of getting that video will be by capturing the packages with a package sniffer? anyways that is not my question I am just really curious on how that program achieves doing what it does. it speeds up everything even Pandora songs.
MySpeed seems to intercept the media stream coming from the server into the Flash player that sits in your browser. It changes the speed on the fly, and sends the result to the Flash player.
PS: If you need to control the playing speed of your own videos I recommend looking into the VLC Browser Plug-in, or the QuickTime player, which also has very good speed control features (from Javascript). Or you could use the HTML5 <video> tag.
Afaik, Flash-based players like Longtail/JWPlayer and Nonverbla don't have very good support for this.
Is it possible to show how many % of the video is loaded?
I just need a simple string like: 32% loaded...
(I use non-streaming (progressive loading))
The FLV player that is built in, you can pretty much only do what you see, so displaying the % loaded, if not already displayed in the skin itself, is either not supported, or not documented. You can make your own skin http://www.adobe.com/devnet/flash/articles/flvplayback_programming.html or use one of the many other available options http://www.google.com/search?q=flv+player, or try the Widget Browser version (which should be CS4 compatible) of the HTML5 Video Player Widget, and that player is based on the following http://www.kaltura.org/project/HTML5_Video_Player it is theme-able. I've not seen a way to show the percentage yet, but perhaps their docs show how to do it.
There is another reference for talking back and forth between Flash and JavaScript, http://kb2.adobe.com/cps/156/tn_15683.html, but you'd need to know what to call, and again, the built in player doesn't appear to be documented well, at least from external interaction, or modifications of the skins themselves.
I know this is not dreamweaver player and it doesn't show %, but this is what I use in my projects http://www.longtailvideo.com/players/
It is a pretty cool player.