Here are videos of the Android and iOS experiences.
Hello Tim,
I tried to reproduce the issue you are having with the latest version of our SDK. I could, however, not achieve the effect. I can use the zOrder property to arrange the ImageDrawable and VideoDrawable any way I like.
I prepared a small sample world for you to try and report back to me with the results (it's just the sample video sample with minor modifications).
var World = { video: null, videoPlaying: false, videoAdded: false, init: function() { this.createOverlays(); }, createOverlays: function() { targetCollectionResource = new AR.TargetCollectionResource("assets/magazine.wtc"); this.tracker = new AR.ImageTracker(targetCollectionResource, { onTargetsLoaded: this.worldLoaded }); var imageResource = new AR.ImageResource("assets/surfer.png"); var imageDrawable = new AR.ImageDrawable(imageResource, 1, { translate: { x: -0.4 }, zOrder: 1, onClick: function() { if (!World.videoPlaying) { World.video.play(-1); World.videoPlaying = true; } else { World.video.stop(); World.videoPlaying = false; } } }); var imageTrackable = new AR.ImageTrackable(this.tracker, "*", { drawables: { cam: [imageDrawable] }, onEnterFieldOfVision: function onEnterFieldOfVisionFn() { if (!World.videoAdded) { World.video = new AR.VideoDrawable("assets/video.mp4", 0.4, { zOrder: 0 }); this.drawables.addCamDrawable(World.video); World.videoAdded = true; } } }); } }; World.init();
Also, which version of our SDK are you using? Which version of the Android OS did you run this on? Which device does this error occur on? Could you isolate the problem in a minimalistic sample for me to have a look at? You may also send me your entire project as long as I can run it without making any modifications.
Kind regards
Daniel
I was able to achieve my desired results by setting the renderingOrder on the on the ImageTrackables.
Tim Grable
I'm having issues with the zOrder of my drawables not working on Android (works fine on iOS).
I have a number of dynamically loaded VideoDrawables with an ImageDrawable that is supposed to sit over the video acting as a play button. This works fine on the iOS version of my app but on the Android version once the video loads it sits on top of the ImageDrawable.
Is there something I'm missing with the zOrder?