I'm trying to open a remote video (let's say it's located at .mp4
) with the default Android player launched directly from Google Chrome, making use of the brand new intent://
.
This is the URI I called through an href
tag:
intent://www.example/video.mp4#Intent;scheme=file;action=android.intent.action.VIEW;end;
Of course, this URI doesn't work, and Chrome returns error "Unable to perform navigation". I've also tried the same URI omitting scheme=file
.
Here's the documentation I've been following:
Thanks in advance!
I'm trying to open a remote video (let's say it's located at http://www.example./video.mp4
) with the default Android player launched directly from Google Chrome, making use of the brand new intent://
.
This is the URI I called through an href
tag:
intent://www.example./video.mp4#Intent;scheme=file;action=android.intent.action.VIEW;end;
Of course, this URI doesn't work, and Chrome returns error "Unable to perform navigation". I've also tried the same URI omitting scheme=file
.
Here's the documentation I've been following: https://developer.chrome./multidevice/android/intents
Thanks in advance!
Share Improve this question asked Dec 29, 2015 at 18:26 josemmojosemmo 7,1033 gold badges39 silver badges50 bronze badges1 Answer
Reset to default 8A quick browse of the Gallery App in AOSP shows that it can be launched from a browser. It has a category of BROWSABLE and DEFAULT. This means given the correct intent URL you should be able to launch it.
Obviously specifying a package should work, but that is not flexible, what if there are two gallery apps.
The following Intent scheme url works:
intent://www.sample-videos./video/mp4/720/big_buck_bunny_720p_1mb.mp4#Intent;action=android.intent.action.VIEW;scheme=http;type=video/mp4;end
Note:
- scheme = http (it needs to be that or https),
- there is a // before the domain, if that is not there the URL is not constructed correctly in the player
- action = android.intent.action.VIEW
- type = video/mp4 - if this is not in place the video will open in the browser
I have created a demo that works