Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by cyrusclarke · Nov 22, 2016 at 09:05 AM · vrplugingooglemovietexturemovie

Video Playback on Mobile Device using GoogleVR Gaze

I'm trying to use the GoogleVR SDK in Unity to control the playback of videos which are loaded on to 4 GameObjects.

Here is some working code for this in Unity (maybe useful for someone else) https://github.com/cyrusclarke/googleVR_Unity_CinemaScene/tree/master

If you deploy this with a working package, the repticle or pointer enables video playback after 3s of "gaze". If the gaze is broken, the video is paused. There is also a counter to measure the time spent gazing at any given GameObject.

The problem is that MovieTexture is not supported for builds to mobile and I need to get this working for mobile. So I have got a plugin which anyone using video on Unity probably knows - EasyMovieTexture.

I have tried to follow the same process as before, calling a function from the source code of the package but this did not work. The new plugin has a script called MediaPlayerCtrl So I am trying to create an object based on that class and this gives me some ability to manipulate the video playback (play/pause etc.) however I still cannot link this back to the GoogleVR Repticle.

I have posted this code in another repository here. https://github.com/cyrusclarke/newRepo

The approach I am thinking is to use GvrReticleNew.cs script to call a function in the mCtrls.cs script via the TimedInputHandler.cs. I have tried passing the HandleTimeInput function to the Update function and then letting the TimedInputHandler connect to the GvrReticle however this approach has not worked.

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 public class mCtrl : MonoBehaviour {
 
     public MediaPlayerCtrl mCtrl1;
 
 //Load some file to the MediaPlayer Controller for the GameObject and play
     private void Awake () {
         Debug.Log ("alive");
         mCtrl1.Load ("IXDAParody.mp4");
         mCtrl1.Play();
 
     }
 
     void Update () {
         HandleTimeInput ();
 
     }
 
      public void HandleTimeInput () {
         ///Basic Controls for Playback
         if (Input.GetKeyDown ("p")){
             mCtrl1.Pause ();
     }
         if(Input.GetKeyDown ("s")){
             mCtrl1.Play();
         }
     //Check Gaze (not working)
         Debug.Log("IM GAZING"); 
 
       }
   }


Well and truly stuck on this so any advice or help would be massively appreciated!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by cyrusclarke · Nov 27, 2016 at 08:17 AM

I managed to solve this so contact me if you ever need help getting movie textures deployed for VR on mobile devices!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

94 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How exactly does one get a video file on an android device? 0 Answers

I can't upload some quind of movies 0 Answers

Pick up Objects using Google Daydream Controller 2 Answers

Google VR SDK for Unity,Google VR SDK not setting to main camera 0 Answers

How do I move forward & raycast based on the MainCamera direction (in UFPS) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges