away3d / away3d-core-fp11

Away3D engine for Flash Player 11
http://www.away3d.com
Other
639 stars 274 forks source link

VideoTextures fail on iOS #726

Open bknill opened 8 years ago

bknill commented 8 years ago

I'm trying to get a video to play in an Away3d texture on iOS. It's fine on Android and Windows. The video will play in Starling on IOS so I know it's not the video.

Here is how I add the video

    sphereGeometry = new SphereGeometry(5000, 64, 48);
    panoTextureMaterial = new TextureMaterial(panoTexture2DBase, false, false, false);

    panoVideoMesh = new Mesh(sphereGeometry, panoTextureMaterial);
    panoVideoMesh.scaleX *= -1;

    panoVideoMesh.rotate(Vector3D.Y_AXIS,-90);

    scene.addChild(panoVideoMesh);
    panoTexture2DBase.player.play();
    view.render();

On iOS I get this from the netstats when I try and load it as a video texture.

NetStream.Play.Start NetStream.Play.Failed NetStream.Play.Stop

I'm using the Away3d NativeVideoTexture class

    texture = context.createVideoTexture();
        texture.attachNetStream(_player.ns);

I think it might be do with MP4 encoding, and I've had a good look around and can't find anything that works, currently I'm trying this in FFMEG

-vcodec libx264 -profile:v main -level 3.1 -crf 23 -s 1024:768 -movflags +faststart
But what I set doesn't seem to make a lot of difference.

Any idea why my video is failing to load as a VideoTexture on iOS?