我正在制作一个显示 360 度视频的网页,但我最近注意到 Android 浏览器中不支持 360 度功能,因此视频无法正确显示,所以经过大量搜索后我发现最好的选择是尝试使用本开发人员教程中解释的“Android Intent”在 YouTube 应用程序中打开视频:
https://developer.chrome.com/multidevice/android/intents https://developer.chrome.com/multidevice/android/intents
所以我需要构建YouTube视频的href地址,但不幸的是我不知道android编程,也找不到YouTube应用程序xml清单来填充选项,有人可以帮助我吗?
intent:
HOST/URI-path <-- I think here needs to be the video URL?
#Intent;
package=com.google.android.youtube.player.YouTubeIntents; <-- Is this the correct package? or should i use com.google.android.youtube.player?
action=createPlayVideoIntentWithOptions(context, UUweNrpFTwA, true, true); <-- Dont know what to put in context field
category=[string]; <-- Is category needed? if so what category should i place here?
component=[string]; <-- Is component needed?
scheme=youtube; <-- Is this the correct scheme?
end;
任何帮助或教程将不胜感激...谢谢!
1)意图解决方案:
<a href="
intent:
//8xn9iq3lG_w/
#Intent;
scheme=vnd.youtube;
package=com.google.android.youtube
S.browser_fallback_url=market://details?id=com.google.android.youtube;
end;
">youtube or market</a>
NB:
也许您需要删除其中的空格href 属性:
<a href="intent://8xn9iq3lG_w/#Intent;scheme=vnd.youtube;package=com.google.android.youtube;S.browser_fallback_url=market://details?id=com.google.android.youtube;end;">youtube or market</a>
2)链接解决方案:
您可以在以下位置获取更多信息Settings > Apps > Youtube > 默认打开 > 支持的链接:
- youtube.be
- m.youtube.com
- youtube.com
- www.youtube.com
See: https://youtu.be/8xn9iq3lG_w https://youtu.be/8xn9iq3lG_w并尝试,在这里:http://output.jsbin.com/tubozokebe/ http://output.jsbin.com/tubozokebe/
<a target="_blank" href="https://youtu.be/8xn9iq3lG_w">link: https://youtu.be/8xn9iq3lG_w</a> or
<a target="_blank" href="vnd.youtube:8xn9iq3lG_w">link: vnd.youtube:8xn9iq3lG_w</a>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)