Search Unity

Cannot make URL video work with google drive URL

Discussion in 'Vuforia' started by Jim_in_dorris, Feb 26, 2018.

  1. Jim_in_dorris

    Jim_in_dorris

    Joined:
    Aug 12, 2015
    Posts:
    21
    Using the tutorial video, I can make video playback work using an empty game object with a camera attached. No scripting is involved at this point. When I use the video from the assets folder it works perfectly in near and far plane. If I select URL, and use the path on my hard drive to locate the video it works perfectly. However if I use the URL from google drive which is generated as the share link, the video doesn't play. Is this a know issue and is there a work around? Because this is a cloud based AR project, it must be built on an android platform for deployment, however right now I am just trying to get video playback working in pc mode. no AR. I will port it to the project with appropriate scripting once I can get it working. Right now the Full Screen is Okay, but I need to get it working in render mode eventually. Any help is appreciated
     
  2. Jim_in_dorris

    Jim_in_dorris

    Joined:
    Aug 12, 2015
    Posts:
    21
    Ok I cannot get Video to work from any sharing site. Youtube, OneDrive, Google Drive, Vimeo etc. Is this just the way it is? I can make video work from non shared sites, but want to put up my own videos.
    Will I need to have my own server or buy some space on a server to do this? It is difficult to teach students how to do this if I can't share the video.
     
  3. Jim_in_dorris

    Jim_in_dorris

    Joined:
    Aug 12, 2015
    Posts:
    21
    if (mTargetName == "05_gmc_1500") {

    // GUI.Box (new Rect(200,200,200,50), "Metadata: " + mTargetMetadata,guiStyle);

    videoPlayer = gameObject.AddComponent<VideoPlayer>();

    videoPlayer.source = VideoSource.Url;

    GUI.Box (new Rect(200,200,200,50), "videoPlayer source is : " + videoPlayer.source,guiStyle);

    videoPlayer.url = mTargetMetadata;

    //GUI.Box (new Rect(200,200,200,50), "videoPlayer url is : " + videoPlayer.url,guiStyle);

    //videoPlayer.isLooping = true;

    videoPlayer.Play();


    }

    I am setting the url because I can display the url in VideoPlayer. I have a camera childed to the image target with camerafarplane selected and the camera set to the appropriate camera. It doesn't play, what on earth am I doing wrong?
     
  4. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    Hello @Jim_in_dorris

    The Videoplayer component is a Unity object and not a Vuforia object so these questions might be better suited for a different forum. My understanding of the component is that you need the URL to end in a file format (such as .mp4) and therefor video sharing site links such as YouTube will not work. I could be mistaken, but I'm sure someone on a different Unity forum can get you the right answer.

    Thanks
     
  5. Jim_in_dorris

    Jim_in_dorris

    Joined:
    Aug 12, 2015
    Posts:
    21
    Thanks I appreciate the response.