ionic-framework - ionic 应用程序上的 Youtube iframe 生成播放图标背景

标签 ionic-framework iframe ionic3 webkit youtube-iframe-api

我正在使用 Ionic 3 开发一个应用程序,它可以重现 YouTube 视频。因为我想要一个嵌入式视频,所以我使用了一个 iframe,其中 src 是视频的 url。 当我在 Android 设备上测试时,我在视频开始播放之前得到了这个。

video after playin on android device

有没有办法避免这种背景?还是让它个性化? 使用“ionic serve”对其进行测试会使背景完全变黑,因此它只会在 android 设备上运行。

最佳答案

为什么不使用临时的 <img> ,只要用户点击 img,<iframe>标记已打开,Autoplay = true。

关于ionic-framework - ionic 应用程序上的 Youtube iframe 生成播放图标背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56484781/

相关文章:

node.js - typescript 错误找不到名称 'require'。 ionic 3

android - AAPT : No resource found that matches the given name

javascript - 调整图标大小以适应 div

angular - 无法绑定(bind)到 'FormGroup',因为它不是 'form' 的已知属性 ----

security - iframe 和 ssl 安全

html - iframe 不调整大小

angular - 使用通用提供程序进行延迟加载

javascript - 如何通过 iframe 共享 jQuery .data() 数据?

angular - 即使我设置了 translate.setDefaultLang ('en' ngx-translate 也无法正常工作)

angular - ionic : ngFor not updating automatically after changes in array