I am developing an Android app using Cordova and Ionic framework. I am playing a YouTube video with InAppBrowser using the code below:
window.open(\'https://
Use embed URL and this should work.
window.open('https://www.youtube.com/embed/v8WjMiodcKo');
Second option is to use '_system', as in example
window.open('https://www.youtube.com/watch?v=v8WjMiodcKo', '_system');
3.1. Download this npm package $ npm install --save angular-youtube-embed.
3.2. Copy angular-youtube-embed.js from \node_modules\angular-youtube-embed\src\angular-youtube-embed.js to www\js
3.3. Add 'youtube-embed' dependency in app.js
3.4. Add this to index.html
3.5. Create a controller
.controller('YoutubeCtrl', function($scope) {
$scope.BestFriends = 'v8WjMiodcKo';
})
3.6. Add this to html page