pouletBBQ

Video won't play on Chrome Android

Recommended Posts

Hello,

I'm doing a project with Phaser (v2.7.5) and I have some issues trying to play videos with Chrome on Android (58.0). I've tried with several different tablets, it does not seem the problem is related to the device.

The same code is working on desktop (Chrome & Firefox) and on Firefox Android.

This is basically my code :

var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create});

function preload() {
    game.load.video('videodemo', 'video/reward.mp4');
}

function create() {
    var videodemo = game.add.video('videodemo');
    videodemo.addToWorld(game.height/2, game.width/2, 0.5, 0.5);
  	videodemo.play();
}

I've tried the following workaround, which I found on another topic. The video plays on Android if I test the code with codepen but for some reason it doesn't if I upload it on my own server. codepen.io/junov/pen/RgrxOB

Any ideas ?

Thanks

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.