Video
Taddeus

I want to have video in my game (between levels, short videos). Is it difficult to make?

 
I think I create a Video object and just play? Is it possible to have this as a feature of wade?
All 4 Comments
Elliot
As far as I know, there is no video support in wade, but you can use the html5 object directly.
 
In theory it's easy, create a new Video object, add it to the document, set its .src property and listen for the 'canplaythrough' event.
 
I agree it would be nice to have something like this in wade.
Gio

We thought about supporting html5 video in WADE, but sadly there would be too many problems. You can get around most of the problems, but there is absolutely no way to make it work in iOS Safari.

 
For some reason, Apple have decided that, on iOS, video can only be loaded on mouseUp (or Click) events. There is no way to load it automatically with the rest of the game.
 
This is similar to what happens with audio, but luckily from iOS 6.0 onward we can get around that using webAudio (which we are going to support from WADE 0.9). For video, there is just no solution...
 
So rather than doing something that would only work on some devices, we decided not to support it. Having said that, what Elliot described above is a perfectly valid solution (except that it won't work in iOS).
Elliot

I vote for onMouseOut too.

 
I understand it wouldn't be very useful if you're making a touch-screen game, but the game I'm making works on mobiles and desktop, and on the desktop version I want to be able to put my mouse over the game objects and have a description appear. So onMouseIn and onMouseOut would be great in my case.
Elliot

So does that mean that 0.8.3 is imminent, and a major release (0.9) is coming soon? :D

Post a reply
Add Attachment
Submit Reply
Login to Reply