Support for Wikitude Software Development Kit and tools is coming to an end. All the details can be found here. Kindly note that no new topics can be started on the forum from 21.09.2023. Also, some of the FAQs here (especially license related ones) might become inaccurate.
Hello!
I'm using Wikitude SDK Android JavaScript API version 5.3.0 and I have the following Code Lines for a videodrawable with buttons:
var video1 = new AR.VideoDrawable("assets/videos/video1.mp4", 1.05, {
verticalAnchor: AR.CONST.VERTICAL_ANCHOR.MIDDLE,
horizontalAnchor: AR.CONST.HORIZONTAL_ANCHOR.CENTER,
enabled: false,
onFinishedPlaying: function() {
video1.enabled = false;
}
});
var page1StopButton = this.createStopVideoBtn(stopBtn, 0.35, video1, 0.95, -0.65);
var page1PlayButton = this.createPlayVideoBtn(imgVideoBtn, 0.35, video1, -0.95, -0.65, page1StopButton);
var page1ReturnButton = this.createReturnBtn(returnBtn, 0.35, video1, page1PlayButton, 0.95, -0.65);
var page1 = new AR.Trackable2DObject(this.tracker, "Cocodrilo", {
drawables: {
cam: [video1, page1PlayButton, page1StopButton, page1ReturnButton]
},
onEnterFieldOfVision: function onEnterFieldOfVisionFn(){
page1PlayButton.enabled = true;
page1ReturnButton.enabled = true;
World.page1.snapToScreen.enabled = false;
snapToScreen: {
enabledOnExitFieldOfVision: true,
snapContainer: document.getElementById('snapContainer')
My question is: How can I make the videodrawable appear in fullscreen?
Hi,
Please have a close look at the JS API reference and the openInBrowser function.
GreetingsNicola
Rodrigo Hidalgo
Hello!
I'm using Wikitude SDK Android JavaScript API version 5.3.0 and I have the following Code Lines for a videodrawable with buttons:
var video1 = new AR.VideoDrawable("assets/videos/video1.mp4", 1.05, {
verticalAnchor: AR.CONST.VERTICAL_ANCHOR.MIDDLE,
horizontalAnchor: AR.CONST.HORIZONTAL_ANCHOR.CENTER,
enabled: false,
onFinishedPlaying: function() {
video1.enabled = false;
}
});
var page1StopButton = this.createStopVideoBtn(stopBtn, 0.35, video1, 0.95, -0.65);
var page1PlayButton = this.createPlayVideoBtn(imgVideoBtn, 0.35, video1, -0.95, -0.65, page1StopButton);
var page1ReturnButton = this.createReturnBtn(returnBtn, 0.35, video1, page1PlayButton, 0.95, -0.65);
var page1 = new AR.Trackable2DObject(this.tracker, "Cocodrilo", {
drawables: {
cam: [video1, page1PlayButton, page1StopButton, page1ReturnButton]
},
onEnterFieldOfVision: function onEnterFieldOfVisionFn(){
page1PlayButton.enabled = true;
page1ReturnButton.enabled = true;
World.page1.snapToScreen.enabled = false;
},
snapToScreen: {
enabledOnExitFieldOfVision: true,
snapContainer: document.getElementById('snapContainer')
}
});
My question is: How can I make the videodrawable appear in fullscreen?