Start a new topic

AR.relativeLocation and AR.VideoDrawable

AR.relativeLocation and AR.VideoDrawable

Please use AR.VideoDrawable's play function to trigger loading and playing of the video. By default nothing is rendered when video is in idle state. You can use a "first-frame-preview-AR.ImageDrawable" and define a click event to start the AR.VideoDrawable.


I made application which uses img and movie.

put the object according to AR.relativeLocation.



if ( == 'video.mp4'){


        AR.logger.debug("video found!!");


        overlay = new AR.VideoDrawable("assets/" +, //mp4 file

        0.5, {offsetX: 0,offsetY: 0,scale:1,       

             onLoaded: function videoLoaded() {

                  AR.logger.debug('mp4 loaded');





}else {


        AR.logger.debug("img found!!");


        overlay = new AR.ImageDrawable(

        new AR.ImageResource("assets/" ),// png file

        1, {offsetX: 0,offsetY: 0,



var location = new AR.RelativeLocation(null, latitude,longitude,al);


this.objs = new AR.GeoObject(location,{

        drawables: {






It works well for png file , but not mp4.


I have checked that mp4 file is correctly encoded,(I use the one which came with samplecode)



Do I do something mistake ?

or is it possible to use video with relativelocation??






Hi Andreas

Thank you for your reply.

I added this and worked!!

 onLoaded: function videoLoaded() {

        AR.logger.debug('mp4 loaded');;



Login or Signup to post a comment