如何在 Cordova Android 应用程序中嵌入 Youtube 视频 [英] How to embed Youtube video in Cordova Android app
问题描述
我是 Cordova 应用程序开发的新手.
I am new to Cordova App development.
我有一个 Youtube URL,我想在 Cordova 应用程序中嵌入视频.我曾尝试使用 YouTube Api(JS 库)和 iframe 制作它.我需要做什么才能在 Android 应用上加载视频?
I have a Youtube URL and I want to embed the video in Cordova app. I have tried making it with YouTube Api(JS Library) and with iframe also. What do I have to do to make the video load on the Android app?
推荐答案
使用 iframe 是嵌入 youtube 视频的首选和建议方式,因此您需要继续这样做.YoutTube iframe API 参考中的入门代码可在两个 iOS 中加载和运行(在 iOS 7 上测试)) 和 Android(在 Android 4.3 上测试).
Using iframe is the preferred and suggested way to embed youtube videos, so this is how you need to proceed. The getting started code from the YoutTube iframe API reference loads and works in both iOS (tested on iOS 7) and Android (tested on Android 4.3).
这篇关于如何在 Cordova Android 应用程序中嵌入 Youtube 视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!