Jump to content

Play video file


RyuMaster
 Share

Recommended Posts

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

  • 4 months later...

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

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

  • 4 months later...
  • 1 month later...

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

  • 2 years later...

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...