Wikitude
play_for_work
Forum
FAQ
Documentation
Download
wikitude.com
How can we help you today?
Enter your search term here...
Search
Start a new topic
Discussions
Wikitude SDK (Android, iOS, UWP)
Wikitude SDK Questions or Problems
How can I reuse VideoDrawable ?
S
Sikarin Ingkaseth
started a topic
over 7 years ago
How can I reuse VideoDrawable ?
3 Comments
Oldest First
Popular
Newest First
Sorted by
Oldest First
S
Sikarin Ingkaseth
said
over 7 years ago
I want to play random video in AR World. I have 11 video.
when video finished. Next button is appear and you can click it to play next video.
Now I create 11 VideoDrawable and then enable or disable it.
but myapp crash when play to 5th video or more
How can I reuse VideoDrawable or better way ?
Thank you in advance for reply
S
Sikarin Ingkaseth
said
over 7 years ago
now I destroy video when video finished and removes video from the ARObject in the cam.
and then I create new VideoDrawable and add new video to the ARObject
but my app still receive message "Received memory warning." at 5th video and crash
now I feel hopeless :(
B
Bikramjit Kar
said
over 7 years ago
Hi, I was facing a similar issue but fixed it. Here's my code that is working now. Hope it helps.
var pageOne = new AR.Trackable2DObject(this.tracker, "*" ,{
onEnterFieldOfVision: function(imageName){
console.log(imageName + " recognized!");
if(this.currentImage!=imageName)
{
this.currentImage = imageName;
if(this.video != null)
{
pageOne.drawables.removeCamDrawable(0);
this.video.destroy();
}
this.video = new AR.VideoDrawable("assets/1.mp4",1,{
offsetX: 0,
offsetY: 0,
isTransparent: true
}
);
this.video.play();
pageOne.drawables.addCamDrawable(this.video);
}
},
snapToScreen: {
enabledOnExitFieldOfVision: true,
snapContainer: document.getElementById('snapContainer')
},
onExitFieldOfVision: function(imageName){
console.log(imageName + " leaving!");
}
});
Login
or
Signup
to post a comment
More topics in
Wikitude SDK Questions or Problems
Instatiation of WTArchitectView compile errors
Point of interest - native iOS
Slider
Camera lagging / slow in native Swift application
Create a web service
N-th ImageDrawable not displayed
Radar Example
stop defaultlocationmanager and use architectview.injectlocation ios 10
WTC Size Limit
AngularJS and wikitude
See all 3870 topics
© 2021 Wikitude, a Qualcomm company
Sikarin Ingkaseth