Start a new topic

Video Drawable

Video Drawable

Hello people, I have a target collection with different targets, each target have   video.


 i just want to know, what video is playing?


Can help me please.

Hi Sergio,

The control over the video playback is in your hands. You can start and pause the video playback as you desire, using the functions.

I suggest to understand which target in your target collection is in the field of vision (using Trackable2DObject.onEnter/ExitFieldOfVision() ) and then start the video that is attached to the target.

Hope that helps.

Best regards,


Thank you Martin, I solved the problem.


Now i want in the moment i touch the screen of my cell phone or touch a button into the video, the video can put in full screen of my phone.


For that in the moment, I'm in Exit Field Of View can seeing the video, without the need to be viewing the image

Hi Sergio,

With SDK 3.x, you can use AR.context.startVideoPlayer(uri) for this. Calling this method with a valid video URL will play the video fullscreen.

With the very-soon-to-come SDK 4, you will be able to snap the content of a Trackable2DObject to the screen, meaning that it is unneccessary for the user to have the video in the field of view still. Please find more information on this feature in our blog:

The SDK 4 will soon be out, please stay tuned on our webpage or check our newsletter for the release.



Thanks Martin,

Really you are the best.

Can you help me in another thing?

I got the video with image, and I want to share that video in facebook, I get all code for do that, but one question: How can i send my video variable since video.js to my Main Activity for share the correct video?


I hope you can understand me.




Hi Sergio,

So if I got your request correctly, you want to pass data from JavaScript to Android, right?

You can do that using the architectsdk:// protocol in JavaScript and ArchitectUrlListener in Java (for details check



Yes you understood me thanks.


But I  don't catch the idea.

This my code can you help me please:

In my World of Javascript I have this:


var x = 2;

var y = 3;

var resu = x + y;

 document.location = "architectsdk://"+resu+"; 


And in Android I already use the UrlListener, but I don't know how to use the urlWasInvoked method, do you have some example?

The main idea of this is that my android app knows the video url that is playing.




Hi Sergio,

The urlWasInvoked method takes one Parameter, the URL that was invoked.

So, if you invoke document.location = "architectsdk://thisIsTheUrl" in JavaScript, the UrlListener's urlWasInvoked method will be called, with "architectsdk://thisIsTheUrl" as Parameter. All you need to do is implement the urlWasInvoked method and do whatever you want to do with the information you've passed from the JavaScript.



Thanks Martin you are the best.


Have a good day.
Login or Signup to post a comment