Thanks, Brent; but I do not want the video to play in a player – I want it to play on an object. Can you help me to do that? My code seems as if it should work (it works fine if I specify the URL by giving it a filename, but not if the URL is created by media.selectVideo – some kind of path conversion needed perhaps?)
So you want to play a video from some remote URL? If so, please see the example under “Remote Video” that specifies “media.RemoteSource” as the target path for the video:
No, sorry, didn’t mean to imply a remote source. I am using media.selectVideo so that I can indetiify a file in the device’s library. Media.selectVideo returns a URL, or path, to the media file selected.
What I’d like to know is why, exactly, my code does not load a video; I can’t see any error in my logic based on the documentation.
I understand your usage case now, so I did some testing on my side. As it turns out, you need to specify the selected video as a “RemoteSource” even though it’s technically on the device, not on a server. So, in your load call, just do this:
[lua]
VIDEO:load( event.url, media.RemoteSource )
[/lua]
That should work fine for you… at least it did for me on iOS (but I did not test on Android).
Thanks, Brent; but I do not want the video to play in a player – I want it to play on an object. Can you help me to do that? My code seems as if it should work (it works fine if I specify the URL by giving it a filename, but not if the URL is created by media.selectVideo – some kind of path conversion needed perhaps?)
So you want to play a video from some remote URL? If so, please see the example under “Remote Video” that specifies “media.RemoteSource” as the target path for the video:
No, sorry, didn’t mean to imply a remote source. I am using media.selectVideo so that I can indetiify a file in the device’s library. Media.selectVideo returns a URL, or path, to the media file selected.
What I’d like to know is why, exactly, my code does not load a video; I can’t see any error in my logic based on the documentation.
I understand your usage case now, so I did some testing on my side. As it turns out, you need to specify the selected video as a “RemoteSource” even though it’s technically on the device, not on a server. So, in your load call, just do this:
[lua]
VIDEO:load( event.url, media.RemoteSource )
[/lua]
That should work fine for you… at least it did for me on iOS (but I did not test on Android).
@bjsorrentino , @jannone
Can we copy That selected video to DocumentsDirectory ?
If Yes, then How ?
I already tried @Scott_Harrison 's docPicker plugin but it can not copy file from event.url.