How to play video in Meteor, in Cordova, on iOS?

I’m building a Meteor app that will be deployed to both iOS and Android. Some of the pages have an embedded YouTube player.

Locally and when deployed to Galaxy, the YouTube videos play without a hitch. When built for iOS, the videos do not play. When built for Android, the videos do play.

On iOS, nothing shows, though the iFrame that’s supposed to hold the video is rendered. That is, an empty space is shown.

In mobile-config.js I have tried



App.accessRule('https://**', { type: 'navigation' } );
App.accessRule('https://**', { type: 'navigation' } );

But, for iOS, this makes no difference.

I’m aware of this Cordova plugin:

However, I’m unable to add it to my project. I’ve tried:

meteor add com.bunkerpalace.cordova.youtubevideoplayer@

This gives me “error: Version string must look like semver (eg ‘1.2.3’)”.

How to get YouTube videos playing in a Meteor app, built on Cordova, on iOS?

Hi @MastaBaba

Your sytax is incorrect, you must prefix with cordova:

meteor add cordova:com.bunkerpalace.cordova.youtubevideoplayer@

As for why its not working now. Have you rebuilt your project after making those changes to mobile-config.js? Have you tried App.accessRule(’*’);

Thanks for spotting that noob mistake.

The plugin installed, YouTube videos are playing in the iOS simulator. Thanks!

Doesn’t explain how the videos were playing in Android, though :confused: