Start a new topic

Video drawable - Audio plays but no picture.

Video drawable - Audio plays but no picture.


Hi,

Sometimes, a video drawable attached to a trackable 2D Object cam plays the video's audio but doesn't display the picture. Reloading the world is required to make the video play as expected, simply exiting and reentering the trackable view isn't enough. It may play as expected on the first reload or take a few tries.

No errors are displayed in the console and the video enable property is true.

We have experienced this with:


transparent and non-transparent videos

online and local apps

using the iOS javascript api


Is this a known bug? Does anyone have a fix?

Let us know if you need any other information.

Thank you in advace :)

Hi Amber,
We are not aware of such a bug on iOS.
May I ask you when you start playback of the video drawable? Have you tried to start it inside the onEnterFieldOfVisionTrigger and stopping it in onExitFieldOfVision?

Best regards

Andreas

Hi Andreas,

Yes, we are using the onEnter and onExit events. Here is a snippet of our javascript (based on the samples):

this.videoBrianSchmidtFull = new AR.VideoDrawable("assets/holograms/Full_Schmidt.mp4", 1, {
isTransparent: true,
isLoaded: false,
offsetX: -0.4,
onLoaded: function() {
World.videoBrianSchmidtFull.isLoaded = true;
World.loadingStep();
},
onFinishedPlaying: function() {
World.videoBrianSchmidtFull.stop();
}
});
this.trackableBrianSchmidt = new AR.Trackable2DObject(this.tracker, "BrianSchmidt", {
drawables: {
cam:
},
onEnterFieldOfVision: function onEnterFieldOfVisionFn() {
if (World.videoBrianSchmidtFull.enabled ) World.videoBrianSchmidtFull.resume();
},
onExitFieldOfVision: function onExitFieldOfVisionFn() {
World.videoBrianSchmidtFull.pause();
}
});

Is there a method like .display() or .show() that I can call too, or does the drawable cam display have to be automatic?

Thank you,

Amber

Hi Amber,
The .enabled property disables a drawables visual appearance. In case of a video drawable it does not show the video but would still play it back in the background. 
Do you disable the video drawable somewhere else? It is enabled by default.

Can you tell me the pixel size of the video?

Have you tried to implement the onError handler for the video drawable?

Have you tried to replace the video file in our example application with your video?

Best regards

Andreas

Hi Andreas, sorry for the delayed response.

Since your last message, we've tried adding enabled = true to all videos just to be sure, and tried adding the videos to the tracker cams using the video onloaded event. Neither of these have resolved the issue.

In answer to your questions:

Can you tell me the pixel size of the video?
480?×?272

Have you tried to implement the onError handler for the video drawable?
We have now, thanks for suggesting it. Unfortunately, no error is raised when the picture fails to show.

Have you tried to replace the video file in our example application with your video?
We have now, thanks for suggesting it too. Unfortuately, we are seeing the same behaviour with the sample app.

We've also tried loading our url into the sample app url manager, and we see the same behaviour there too.

What is your suggested next step?

Thanks in advance.

 

Hi Amber,
I would like to have a closer look at your problem. Can you create a project that demonstrates the issue and maybe share it on GitHub with us? It might also be enough if you share the video with us.

Best regards

Andreas

Hi Andreas,

I have a project ready to share with you. Would you like the entire xcode project or just the architect world files? Also, can I send you a dropbox link by email please? I can't share the project publicly because it's client work.

Many thanks,

Amber

Hi,

I am experiencing the similar problem here.

I am trying to play the sample transparent video on a geo location

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="target-densitydpi=device-dpi, width = 540, user-scalable = 0" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My ARchitect World</title>

<!-- Include the ARchitect library -->
<script src="architect://architect.js"></script>


<script>

function createVideoDrawable()
{
AR.logger.activateDebugMode();


var directionIndicator = new AR.ImageDrawable(new AR.ImageResource('assets/DirectionIndicator.png'), 0.1, {
verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP
});


var videoDrawable = new AR.VideoDrawable('assets/transparentVideo.mp4', 1.0, {
onLoaded: function onLoadedFn() {
videoDrawable.play(-1);
}
});

var drawableLocation = new AR.RelativeLocation(null, 10, 0);
var drawableLocation = new AR.GeoLocation(53.11043730238466,7.692151660323143, 110.);

var geoObject = new AR.GeoObject(drawableLocation, {
drawables: {
cam: videoDrawable,
indicator: directionIndicator
}
});

AR.logger.info("video created");
}

</script>
</head>

<body>
<script>createVideoDrawable()</script>
</body>
</html>

 

as you see, it's based on your sample code that you uploaded in another thread.

it plays sound, but no image is shown. What am I missing? 

Thanks!

 

Hi,

Of course it starts playing back audio. You scripted that it should start palying indefinetly as soon as it is loaded. If you look at your geo position you will see it (if your compass is calibrated). 
You can use the onEnterFieldOfVision/onExitFieldOfVision trigger to start/stop the video drawable only if it's in your viewport.

Best regards

Andreas

Hi Amber,
You can send it to ios-sdk@wikitude.com. Simply add a link to this forum thread in your email so that we know where it belongs to.

Best regards

Andreas

Hi Andreas,

thanks for your reply.

I did try at the geolocation, which I obtain from the test smart phone(not the one given in the code above). Still I can only hear the sound of the video...  the gps accuracy was around 10 meters. 

Nice weekend to all!

John

Hi Andreas,

We sent a link to ios-sdk@wikitude.com last week with the subject line RE: Video drawable - Audio plays but no picture. Attn: Andreas Schacherbauer

Can you confirm that you received it please?

 

Many thanks,

Amber

Hi Amber,
I received your project, thx. I will have a look at it as soon as possible.

Best regards

Andreas

Hi Andreas,

Have you been able to investigate why sometimes video drawables play audio but don't show any picture?

We're still experiencing this behaviour in every app and world we create, and it's causing friction with our clients.

Kind regards,

Amber
Login or Signup to post a comment