RyuMaster Posted May 31, 2014 Share Posted May 31, 2014 Hi! For some reason, can not google any info on this. Is it possible to play video file with phaser, for example, stream youtube video on top of current canva/stage? Link to comment Share on other sites More sharing options...
lewster32 Posted May 31, 2014 Share Posted May 31, 2014 Since Phaser runs in a webpage, you can place anything over or behind it just as you'd normally do. It would be difficult and impractical however to do this actually inside the Phaser canvas itself (i.e. have video playing inside a Sprite) when compared to using normal DOM methods. If you do really need to get video into Phaser, there are simple methods to get the HTML5 video tag into a canvas context, however I'd imagine your results will vary depending on the capabilities of the browser you're viewing it in and the source of the stream. Link to comment Share on other sites More sharing options...
efusien Posted October 20, 2014 Share Posted October 20, 2014 I use the default HTML5 player outside Phaser. The video is working.But if I play any music inside my Phaser game after loading the video, the music is broken (slow), or doesn't play. Is there a conflict with Phaser playing music and Video loading? Link to comment Share on other sites More sharing options...
lewster32 Posted October 21, 2014 Share Posted October 21, 2014 Which browser and what format is the music in? Link to comment Share on other sites More sharing options...
efusien Posted October 21, 2014 Share Posted October 21, 2014 It's in a Cordova app on IOS 6+, so Safari browser.Music is MP3, or WAV. Both are running bad. Sound is marked as "decoded". After few test, with a video without music inside, there is no conflict and Phaser sounds run well.So I guess it's a channel conflict between Phaser channel and video channel.Is there a way to assign "empty" sound channel to Phaser game? I don't know how the video player assigns it's own channel, but the fact is it's overlaping the Phaser channel. Link to comment Share on other sites More sharing options...
jdnichollsc Posted March 9, 2015 Share Posted March 9, 2015 My example with Phaser and video tags: http://phaser.azurewebsites.net/videos/ (swipe to left gesture to continue the next video) But it is very slow in mobiles Regads, Nicholls MichaelD 1 Link to comment Share on other sites More sharing options...
grumpygamer Posted April 27, 2015 Share Posted April 27, 2015 I think this should be one thing to integrate in further iterations.One of the most basic scenarios are game intros which would hugely benefit video content. Link to comment Share on other sites More sharing options...
MichaelD Posted April 27, 2015 Share Posted April 27, 2015 I don't think having phaser integrate video on canvas would be much of a benefit, because the huge processing power would still be needed, imagine that video on canvas draws every frame of the video on the canvas pixels. Unfortunatelly the browser cannot handle this kind of process easily especially a mobile browser with limited cpu/gpu power. Link to comment Share on other sites More sharing options...
grumpygamer Posted April 27, 2015 Share Posted April 27, 2015 Ok so how would we handle (short) video intros? Link to comment Share on other sites More sharing options...
MichaelD Posted April 27, 2015 Share Posted April 27, 2015 Same way Nicholls suggested here http://www.html5gamedevs.com/topic/6851-play-video-file/#entry74792, basically the problem is not the length of the video but the size, if you have a 200x200 video it would play smoothly in most browsers, but a fullscreen intro is a no-go with most modern browsers and rigs... Link to comment Share on other sites More sharing options...
grumpygamer Posted April 27, 2015 Share Posted April 27, 2015 Ok thanks for your answer.Though I think a game engine without some sort of video handling is a bit weak.Just thinking of most games I've played have some sort of cut scene or intro (Bink video was all over the place a while ago). My 0.02$ MichaelD 1 Link to comment Share on other sites More sharing options...
MaraRoses Posted December 20, 2017 Share Posted December 20, 2017 Hello, I' m using Phaser 2.4.4 creating games. I would like to know what is the best in resources cost( cpu gpu cost ) way to load and use video files? In which formatting should my video files ? Anyone that had done it before and can help me please. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts