I'm trying to open a url in my application directly to the smartphone YouTube application (like using an intent) by clicking on a 3D object in Wikitude.
In the event onClick changed the url of the page as follows:
The code works, however redirects the page to the web version of youtube and do not call the YouTube application.
To my surprise do this same procedure on a normal page in phonegap works perfectly.
Someone can help me with this problem?
A
Andreas Schacherbauer
said
over 7 years ago
Hi Augusto, The Wikitude SDK does no special handling of redirects that happen inside the ArchitectView. Maybe Cordova added some code or enabled a switch that we haven't.
You could try to:
* Set the document location to 'window.location = architectsdk://open_youtube?url=*url*' * Setup a architectsdk protocoll callback in your cordova application using the Wikitude plugin function `setOnUrlInvokeCallback` * Within the callback function, call again window.loation.href = "youtube url"
Did you know that you can also playback videos right within our SDK? You can define video augmentations (AR.VideoDrawable) or full screen videos (AR.context.startVideoPlayer).
Augusto.pimenta