“;href”;在Android上的youtube应用程序或市场(Google Play)中打开视频的HTML值
我正在制作一个显示360个视频的网页,但我最近注意到android浏览器中的360功能不受支持,因此视频无法正确显示,所以在搜索了很多之后,我发现最好的选择是尝试使用“android意图”在YouTube应用程序中打开视频在本开发人员教程中解释: 所以我需要为YouTube视频构造href地址,但不幸的是,我不懂android编程,也找不到YouTube应用程序xml清单来填充选项,有人能帮我吗“;href”;在Android上的youtube应用程序或市场(Google Play)中打开视频的HTML值,android,html,android-intent,youtube-api,android-youtube-api,Android,Html,Android Intent,Youtube Api,Android Youtube Api,我正在制作一个显示360个视频的网页,但我最近注意到android浏览器中的360功能不受支持,因此视频无法正确显示,所以在搜索了很多之后,我发现最好的选择是尝试使用“android意图”在YouTube应用程序中打开视频在本开发人员教程中解释: 所以我需要为YouTube视频构造href地址,但不幸的是,我不懂android编程,也找不到YouTube应用程序xml清单来填充选项,有人能帮我吗 intent: HOST/URI-path <-- I think here need
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;
意图:
主机/URI路径您可以使用:
window.location=”intent://scan/#Intent;scheme=youtube;package=com.google.youtube;end“
我不确定……但请尝试。1)意向解决方案:
NB:
也许您需要删除href attribute中的空格:
2) 链接解决方案:
您可以在设置应用程序Youtube默认打开支持的链接中获得更多信息:
- youtube.be
- m、 youtube.com
- youtube.com
- www.youtube.com
请参见:并尝试,此处:
或
您没有说出要使用的语言。我正在尝试使用html标记从网页打开YouTube,根据本教程理论上是可行的:是的,但如果未安装YouTube应用程序,此解决方案不会将用户重定向到playstore,并且可以。。。这就是为什么我需要更改此示例并为youtube应用程序填写正确的信息。您知道是否可以自动全屏播放视频吗?我不知道,但我不知道如何使用html。
<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>
<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>
<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>