Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Does this SDK support playing remote URIs? #65

Closed
kvenn opened this issue Apr 5, 2016 · 18 comments
Closed

Does this SDK support playing remote URIs? #65

kvenn opened this issue Apr 5, 2016 · 18 comments

Comments

@kvenn
Copy link

kvenn commented Apr 5, 2016

I've hosted a few monoscopic and stereoscopic .mp4 files which I've tried to play in the simplevideoviewwidget sample, but haven't had any luck. I just added in a line to override the local uri with a remote uri:

fileUri = Uri.parse("http://www.myurl.com/360video.mp4");

I just got it working with iOS sample where the docs specify that the load method works with remote URL's, but the Android docs for loadVideo(Uri) make no such promise. I'm just wondering if there currently is support for playback of remotely hosted Uris (or support in the near future).

Thanks

@kvenn kvenn changed the title Does this SDK support playing remote urls? Does this SDK support playing remote URIs? Apr 5, 2016
@kfung0426
Copy link

+1

I am seeking remote url support too

@lingkang1988
Copy link

This feature is useful, looking forward to seeing it soon

@jksfood
Copy link

jksfood commented Apr 10, 2016

+1,as soon as possible

@5bruce
Copy link

5bruce commented Apr 12, 2016

I met the same trouble.It just can play the local video by this method(loadVideo(Uri)).But if your file is too big ,it does not work.I want to enter the video link, then you can play video. Do not know how to get. This is my demand is not supported? This function is perfect or. thanks!

@wwrrss
Copy link

wwrrss commented Apr 16, 2016

+1 this is a must have!

@kvenn
Copy link
Author

kvenn commented Apr 18, 2016

Just as a follow up to anyone who's interested:
The iOS SDK supports this so I can only imagine it is in the pipeline - this is also version 0.7.0 so I have big dreams for this SDK in the future. So I wouldn't really recommend trying to find a way around it.

BUT if you're really in a pinch (like I was), I got remote URL's to work by building a custom downloader which downloads the .mp4 video resource to the device. Then when it reaches about 10% completion, I start playing the file back using the SDK's loadVideo(String) method. I have a catch in the onError for FileNotFoundExceptions which tells the system to wait a bit, then resume playback when there has been additional progress on the download. This is pretty much just a crummy buffer implementation.

It worked fine and was easy to write, but was by no means optimal.

@dav-cz
Copy link
Contributor

dav-cz commented Apr 18, 2016

Looks like this feature is popular! Thanks for the feedback, we'll definitely place this high on our TODO list.

@humhann
Copy link

humhann commented Apr 24, 2016

+1, would be very welcoming to have

@BrendanParks
Copy link

+1, an out-of-the-box solution to this would be totally awesome

@Millertoken
Copy link

@dav-cz hello,when this can be completed?And how can i use other mediaplayers play videos on the videowidget?

@dav-cz
Copy link
Contributor

dav-cz commented May 18, 2016

We added support for remote URLs (e.g. www.domain.com/file.mp4) in v 0.8. Pretty basic for now as it supports only mono 360, but we'll improve this in future versions.

@dav-cz dav-cz closed this as completed May 18, 2016
@dav-cz
Copy link
Contributor

dav-cz commented May 18, 2016

By the way, thanks all for the massive feedback on this issue. This has helped up prioritize this even while we were super focused on adding support for NDK and Daydream developer preview.

@aaronliew
Copy link

aaronliew commented May 19, 2016

@dav-cz , thanks for your effort. I have issues in playing the sample video from both local and remote uri. The video was playing, however, the whole screen was black. All I heard was just the audio. Do you have any suggestions to fix this issue?

@dav-cz
Copy link
Contributor

dav-cz commented May 24, 2016

Hi @aaronliew, could you create a separate bug for this? with logcat / phone model / android API / whether you have a back screen with a sample video such as http://techslides.com/demos/sample-videos/small.mp4

@digitalbuddha
Copy link

@dav-cz I'm having trouble playing a remote video due to inability to buffer. The video in question is: http://video1.nytimes.com/video/360-demo/cool.mp4

When I drop the video in as a static asset everything plays perfectly. When trying to stream, the video stops and does not start on its own again. Is there a way to control how much is download before starting as well as general buffering strategies?

The only code change I made to SimpleVrVideoActivity is to change the url in async task to videoWidgetView.loadVideo(Uri.parse("http://video1.nytimes.com/video/360-demo/cool.mp4"),new Options());

I see that there's some generated code that deals with exoplayer, maybe there are more hooks that can be exposed?

@dav-cz
Copy link
Contributor

dav-cz commented Jun 17, 2016

What phone / Android version are you using? Anything interesting in logcat?

I'm able to play your video with the sample app on Nexus 5 running Android 5.0.1.

adb shell am start -a android.intent.action.VIEW -n com.google.vr.sdk.samples.simplevideowidget/.SimpleVrVideoActivity -d "http://video1.nytimes.com/video/360-demo/cool.mp4" --ei inputFormat 1

@digitalbuddha
Copy link

5x N beta 4. Will confirm on lots of devices on Monday
On Jun 17, 2016 7:20 PM, "David Coz" notifications@github.com wrote:

What phone / Android version are you using? Any thing interesting in
logcat?

I'm able to play your video with the sample app on Nexus 5 running Android
5.0.1.

adb shell am start -a android.intent.action.VIEW -n
com.google.vr.sdk.samples.simplevideowidget/.SimpleVrVideoActivity -d "
http://video1.nytimes.com/video/360-demo/cool.mp4" --ei inputFormat 1


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#65 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AEUX3KCQ3G8JSKtdYJnVN47GYLtnwwHzks5qMyuugaJpZM4H_rWg
.

@digitalbuddha
Copy link

@dav-cz apologies for posting on an older issue but we did some more tests and the issue is only on N Beta devices. Just a heads up that there seems to be buffering difference between 5X M & 5X N Beta 4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests