Start a new topic

Video not playing (wikitude sdk 1.1.1 + phonegap)

Video not playing (wikitude sdk 1.1.1 + phonegap)


Hello,

I am using the latest version of your wikitude sdk 1.1.1 + phonegap

when I try to open a video I get error:

try

 

{

        var url = "http://www.wikitude.com/doc/tutorial/Serie3.m4v";

        // Start fullscreen playback of video at the supplied URL

        AR.context.startVideoPlayer(url);

}

catch(e)

{

alert("Error loading the video: " + e.message);

}

 

I always get a "bad address" error.

it works fine with AR.context.openInBrowser(urlpage, true);

 

what am I doing wrong?

thank you.

 

 

 

Hello!

Could you provide me with more information about your project setup, especially are you deploying your phonegap app for Android or iOS and whether this problem exists when deploying for both platforms.

Thanks

hi Marcus,

I am implementing my project, starting from your demo. https://github.com/phonegap/phonegap-plugins/tree/master/Android/AugmentedReality-Wikitude/SampleProjects/Basic

I am curretly working on eclipse and deploy on device "Android", 

I am using cordoba 2.0 + wikitude 1.1.1

the AR works fine.

the POI Bubble click works fine as well.

Teh video isn't.

Thank you for your help.

 

//function that gets called when the displayed poi bubble is clicked

//sends the id of the selected poi to the native app

function generateOnPoiBubbleClickFunc(id)

{

return function()

{

if (jsonObject.videoID!="")

{


  try

  {

       var url = "www.wikitude.com/doc/tutorial/Serie3.m4v";

       AR.context.startVideoPlayer(url);

  }

  catch(e)

  {

      alert("Error loading the video: " + e.message);

  }


}

else

alert("Sorry, Video not available.");

}

}

}

 

 

Hello!

On the android platform a different component is used to display video. In order to use this component within you phonegap application, the following snippet needs to be integrated into your Android application manifest file:

 

        <activity

            android:name="com.wikitude.tools.activities.MediaPlayerActivity"

            android:screenOrientation="landscape"

            android:theme="@android:style/Theme.Light.NoTitleBar" >

        </activity>

Hope that helps you with your problem

Markus 

Hi Markus,

thank you for your solution, it worked fine on Android native.

Is it possible to achieve the same result using PhoneGap Build Service ?

https://build.phonegap.com/docs/config-xml

Thank you,

Salvo

 

Hi!

As the XML-snippet i provided is part of our native SDK and not the Phonegap Build service, unfortunately it is currently not possible to achieve this using PhoneGap's Build service. We are currently thinking about a facilitated usage of this functionality in an upcoming version of our PhoneGap plugin.

Thx

 

hi Marcus,

I am implementing a project for iPhone... using XCode, + PhoneGap + WikiTude DSK 1.1.1

my project, starting from your demo. https://github.com/phonegap/phonegap-plugins/tree/master/Android/AugmentedReality-Wikitude/SampleProjects/Basic

I am using cordoba 2.2.0 + wikitude 1.1.1

the AR works fine.

the POI Bubble click works fine as well.

The video isn't starting.

Do I need to set something on the *.plist file?

Thank you for your help.

 

//function that gets called when the displayed poi bubble is clicked

//sends the id of the selected poi to the native app

function generateOnPoiBubbleClickFunc(id)

{

return function()

{

if (jsonObject.videoID!="")

{


  try

  {

       var url = "www.wikitude.com/doc/tutorial/Serie3.m4v";

       AR.context.startVideoPlayer(url);

  }

  catch(e)

  {

      alert("Error loading the video: " + e.message);

  }


}

else

alert("Sorry, Video not available.");

}

}

}
Login or Signup to post a comment