Log in or register to post comments

Play/pause by taping AR videoplayback

April 20, 2021 - 11:26pm #1

Hi. I have a project i want to make for my work, some kind of "AR gallery" for mobiles.

I have made 3 target images. Each plays video on the quad upon target found. They all work fine, playing one at the time. But i want to implement function of playing/pausing video by tapping AR video player on screen. 

How do i do that? Im new to vuforia and i've learned that i need to use RayCasting, but have no idea how to tie it with video player controls. 

Im using custom tracking script i've found on some YouTube tutorial, maybe there's a way to modify it?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class TrackableEvent : DefaultTrackableEventHandler {

    public UnityEvent onTrackingFound;
    public UnityEvent onTrackingLost;

    protected override void OnTrackingFound()
    {
        base.OnTrackingFound();
        onTrackingFound.Invoke();
    }

    protected override void OnTrackingLost()
    {
        base.OnTrackingLost();
        onTrackingLost.Invoke();
    }
}

Thanks in anvance.

Play/pause by taping AR videoplayback

April 21, 2021 - 4:46am #2

Hi,

We demo videoplayback in our Core Samples from the Unity AssetStore: https://assetstore.unity.com/publishers/24484. Please review our implementation as it covers your use-case.

Thank you.

Vuforia Engine Support

 

Log in or register to post comments