Skip to main content

Posts

Showing posts from April, 2015

Play youtube video in Ionic Framework App

We can add YouTube videos in our simple ionic app by creating simple directive in angularjs and pass the youtube video id. I have refer multiple sites and solutions and after that create one directive and use it in my app to embed youtube video in ionic app. 1.Create the project ionic start Test blank cd Test ionic platform add android 2.Implementation Here is how most people add a YouTube player to their hybrid app : <iframe src="https://www.youtube.com/embed/KBKXu3Kg4yg?rel=0" frameborder="0" allowfullscreen> </iframe> This is simple way but here we ar not handle some events with youtube video and it's may be complicated for us.For that we creating directive and use it our view. First head out to google development docs and look up the programmatic way of embedding YouTube using javascript. Following code shows the code in our directives.js file angular.module('starter.dirctives', []) .directive(...