VideoTexture looping?

Software: Away3D 4.x

Beek, Member
Posted: 04 February 2016 03:57 AM   Total Posts: 67

Anyone found a nice way to get VIdeoTexture to loop without a black space or flickering green between loops? Especially bad on mobile.

   

Beek, Member
Posted: 05 February 2016 08:28 AM   Total Posts: 67   [ # 1 ]

I can kind of get it to hide the mesh, with a skybox of an image behind it when the video stops and show the mesh again when the video is ready to play, however this is intermittent and only really works with by setting the material alpha to 0, which I’d expect is going to have an adverse effect on performance.

This is a videoTexture on the inside of a sphere.

Setting the mesh.visible to false doesn’t nothing.

Is there any other way of hiding a mesh with a video Texture while the video texture has gone black because it’s seeking to the start when it loops?

   

sun9278888, Newbie
Posted: 19 May 2016 02:50 AM   Total Posts: 1   [ # 2 ]

Have u solved this problem?

   

Beek, Member
Posted: 19 May 2016 09:45 PM   Total Posts: 67   [ # 3 ]

Yeah for some reason it was only happening in the debug version, it wasn’t happening on the published app so I’ve left it.

What I ended up doing was waiting until it got to the last second, pausing and seeking back to 0.

private function onTextureReady(e:Event):void
  {
   
if(_player.duration)
    if(
_player.ns.time _player.duration 1){
     _player
.pause();
     
dispatchEvent(new Event(VIDEO_STOP));
     if(!
gameControl)
      
_player.seek(0);
    
}
    
else if(_player.ns.time 0.01 && waitingForBuffer && !preLoaded){
     dispatchEvent
(new Event(VIDEO_START));
     
waitingForBuffer false;
     
_player.ns.removeEventListener(NetStatusEvent.NET_STATUSnetstat);
    
}
     
  } 

It’s still not working in iOS, if you manage to get VideoTextures working in Away3D on iOS I’d love to see how! 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X