Log in or register to post comments

Inserting Video and Soundclips on Image target using Javascript

February 19, 2014 - 7:58am #1

Help please on how to insert videos and sound clips on image target using javascript.  hope you can help me .
thanks.

Inserting Video and Soundclips on Image target using Javascript

March 12, 2014 - 9:04am #13

I replied there.

Inserting Video and Soundclips on Image target using Javascript

March 12, 2014 - 7:47am #12

Inserting Video and Soundclips on Image target using Javascript

February 26, 2014 - 7:28am #11

sir. i've downloaded the videoplayback package in the asset store , i got the sample scene on that package and run it to my android device , when i scan the image target it show a play button but it won't play, i can't even tap or touch the play button.? what's the problem with that? is there a separate code for tap and touch ?

Inserting Video and Soundclips on Image target using Javascript

February 23, 2014 - 1:03am #10

No, there is not a single script to do that; you need to use the Video Prefab and a set of scripts (such as VideoPlaybackBehaviour and VideoPlayerHelper) that you can find in the VP sample.

Basically it boils down to instantiating the Video prefab and attach it to the Image Target of your choice, but I recommend looking at the sample for the complete scene and code setup.

 

Inserting Video and Soundclips on Image target using Javascript

February 21, 2014 - 6:42pm #9

sorry sir .
i'm slow to understand the code.  if you don't mind, do you have some one straight  CS script code on how to make video playback?
or some video tutorial? thanks sir

Inserting Video and Soundclips on Image target using Javascript

February 21, 2014 - 11:31am #8

That's explained in the VideoPlayback sample. You can take the code from there, or start your App by building it on top of the existing VideoPlayback sample.

 

Inserting Video and Soundclips on Image target using Javascript

February 21, 2014 - 9:18am #7

i've fix the audio issues on my AR.

but how i will gonna make play video on image target?

Inserting Video and Soundclips on Image target using Javascript

February 20, 2014 - 11:45am #6

If the sounds gets distirted this could depend on the fact that the distance to the camera is changing, and the 3D sounds settings are affecting this.

As explained in the tutorial, you need to adjust the 3D Sound Settings of the audio source to get good results. You may also want to check the Unity 3D documentation about handling Audio Source in a 3D scene.

http://docs.unity3d.com/Documentation/ScriptReference/AudioSource.html

 

 

Inserting Video and Soundclips on Image target using Javascript

February 20, 2014 - 8:03am #5

sir. how to add video on image target?

i want to also talk about the audio play on image target. why the sound is like broken sound or like a playing damged sound . and aslo why when i move the target , the sound is like distorted.

Inserting Video and Soundclips on Image target using Javascript

February 19, 2014 - 11:43am #4

Yes, you can put the script to the image target in your scene.

Inserting Video and Soundclips on Image target using Javascript

February 19, 2014 - 8:29am #3

If i follow that instruction. i Just put that script in the image target itself? the if i scanned the image target with my android phonen , the audio clip  will automatically  turn on, is that right?

Inserting Video and Soundclips on Image target using Javascript

February 19, 2014 - 8:11am #2

If you look at this tutorial:

https://developer.vuforia.com/forum/faq/unity-how-can-i-play-audio-when-targets-get-detected

This explains how to do thtis using C#.

We don't have an equivalent tutorial for Javascript, and I would recommend to use C# since the Vuforia API for Unity is written in that languagfe (there is no Javascript API for Vuforia).

If you really want to use Javascript, then you will need to implement the basic part on C# as explained in the article above (in particular because the TrackableEventHandler needs to be implemented in C#, and there is not much you can do in Javascript about that), and then connect the event somehow to your Javascript to play the sound.

But mixing Javascript and C# scrips will be much harder than just doing everything straight in C#.

 

 

Log in or register to post comments