Get Started         Best Practices         Developer Guide         FAQ        
Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

AR SDK fullscreen (continue playing video fullscreen)

Jochem Rommens Jul 06, 2015

Hi,

I was wondering if there is an easy way to continue playing a video fullscreen (so in the native video player) after double tapping it or when tapping a button?


( Agent )
Alex Torrents

Jul 08, 2015

Hi Jochem,

We have a sample for Android only, but for iOs is similar.

In this link show how to play a video fullscreen, in the method trackingLost(), change it for onClick() for button or GestureDetector for double tap.
https://github.com/Catchoom/craftar-example-android/blob/open_video_on_tracking_lost/src/com/catchoom/catchoomexamples/MyARItem.java#L39

For iOs is similar, you need detect the event and navigate to a new view.

Bests,
Alex.

0 rated
Jochem Rommens

Jul 08, 2015

Hi Alex,

Thank you for your reply!
I'm gonna try and implement it in my app.

Best regards,

Jochem Rommens
0 rated
han

Nov 23, 2015

Hi,

This is of importance to me. But the link is broken. Please assist.
0 rated
( Agent )
Miquel Ferrarons

Nov 25, 2015

Hi Han,

What you propose can be done but the SDK does not offer a clean and simple interface to do it. I will just give you some hints of what you could do:

You will have to do two things:

1. Keep drawing the contents of the item when the tracking is lost :
Use the method ’setDrawsOffTracking() from the class CraftARItem. By doing it , the contents will keep drawing even if the tracking is lost.

2. Modify the item’s pose (translation + rotation) at the ‘trackingLost’ event, so the contents are rendered as if it was full-screen.

CraftARItemAR.setItemRotation(rotationMatrix);
CraftARItemAR.setItemTranslation(translation);

The item Rotation and Translation specify the position where the Marker was found in the frame. You should have to emulate the parameters that make it look like it’s full-screen. To have an idea of what values you should use, you could use the methods CraftARItemAR.getItemRotation() and CraftARItemAR.getItemTranslation() . Place the marker in a position that makes the video show in full-screen, and write down the values of the rotation and translation at that moment. Then, you can re-use those values at the trackingLost() event, so the video will be rendered with that pose.

Best,
Miquel.

0 rated
Han

Nov 26, 2015

hi Miquel,

Thank you for the reply.

ok the proposed solution is quite involving. Maybe if i can get the urlHyperLink of the video then i can forward the url to another viewController then have it played full screen. The issue is that urlHyperLink method returns null for all videos. Any idea why?

Best
Han
0 rated
( Agent )
Luis Martinell

Nov 27, 2015

Hello Han,

The Hyperlink URL is null because video contents don’t have a hyperlink URL by default (when created through the CraftAR Creator). You can, though, set a Hyperlink URL through the Management API.

I suggest you review this article for more details.

0 rated

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Couldn't find what you were looking for?

support@catchoom.com
https://cdn.desk.com/
false
catchoom
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete