Hi, I have a working app I’m porting from Droid to Windows Phone 8.1. It’s not my app, and I’m not terribly familiar with Unity but I’m learning as I go. So far I’ve got almost all of it working and running on a device, however video files don’t play.
Currently there is a script that looks like this:
using UnityEngine;
using System.Collections;
public class PlayVideo : MonoBehaviour
{
public string path;
[ContextMenu ("Play")]
public void Play()
{
Handheld.PlayFullScreenMovie (path);
}
}
I noticed in the docs there was a small comment regarding this:
It says Internally, so I’m assuming, probably incorrectly, that I don’t have to mess with XAML?
I’ve also created the StreamingAssets folder under Assets and dropped my video in there.
Interesting point: I changed the path of my movie to StreamingAssets/video.mp4 and I got an exception, so it appears it’s doing something, at the very least it finds the file otherwise I’m guessing it would throw an exception when I just give it video.mp4
My gut feeling is I’m missing some kind of Visual Studio side markup in the XAML, maybe…
I’ll continue trying to trace through the scripts and see what falls out, but if anyone has any tips or tricks re Video on Windows Phone 8.1 / Windows Store apps then I’d be very happy to see them, thanks!
Do you know how I can stop and remove the video player on the windows back button? We failed submission on this I added CancelOnInput which works for a screen press but not for the hardware back button. I’m thinking that maybe we can override the back button to be something else at runtime just before the video play and put it back after, but not sure how.
maybe a moderator could move this thread over to the Windows Platform forum area… i’m sure there’s someone there that probably knows what exactly to do…