Start a new topic

GeoObject and VideoDrawable issue

GeoObject and VideoDrawable issue


Hi,

I use Android sdk 3.2.1, I play successfully with the samples. But I was not able to insert a video (the sample transparent one) on a POI.

here is a piece of code. I just modify the browsing poi sample (with range limitation ui), adding an ugly condition in order to try the video.

if I don't pause the video at startup, I can hear it. so the device, was able to load the media.

if(poiData.id=='video'){
this.video = new AR.VideoDrawable("assets/transparentVideo.mp4", 0.4, {
isTransparent: true
});
this.video.play(-1);
this.video.pause();
this.markerObject = new AR.GeoObject(markerLocation, {
drawables: {
cam: ,
radar: this.radardrawables,
onEnterFieldOfVision: function() {
this.video.resume();
},
onExitFieldOfVision: function() {
this.video.pause();
}
}
});
}else{
// ORIGINAL SAMPLE CODE FROM SDK

this.markerObject = new AR.GeoObject(markerLocation, {
drawables: {
cam: ,
indicator: this.directionIndicatorDrawable,
radar: this.radardrawables
}
});
}

 

 

However I can't see the video in the camera (but the circle appears on radar at the right place)

using ADE on the desktop, it seems that the GeoObject is not created for videos. 

Any ideas ? 

Best Regards

Jean-Marie 

 

 

 

 

Nobody to answer ? 

Have you checked for any javascript errors when running it using the ADE? If there is no GeoObject created in the ADE you won't be able to see it on the device.

Additionally your GeoObject creation does not set a Exit or EnterFieldOfVision trigger as the brackets are set incorrectly. Try setting them similar to to

new AR.GeoObject(markerLocation, {

drawables: {

cam: ,

radar: this.radardrawables

},

onEnterFieldOfVision: function() {

this.video.resume();

},

onExitFieldOfVision: function() {

this.video.pause();

}

});

 

Let me know if you have more questions.
Login or Signup to post a comment