brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive
http://brandly.github.io/angular-youtube-embed/
MIT License
510 stars 147 forks source link

playVideo is not working in ionic v1 #162

Open powerboom opened 5 years ago

powerboom commented 5 years ago

I am using this plugin in my android APP build in ionic v1. I used bower to install this plugin. I followed all steps. Video is perfectly loaded but when i try to play with an external button using function playVideo(). video is not playing. Please help. do in need to set any permission from devleoper console ?

brandly commented 5 years ago

hey, i recommend looking thru other ionic-related issues. ionic also has forums which i know occasionally discuss this repo. (i've never actually used ionic myself.)

when i try to play with an external button using function playVideo(). video is not playing.

on mobile sites, to prevent annoying ads from autoplaying and such, anything with video/sound requires direct user interaction in order to play. this means you can't automatically call playVideo() in your script, until after the video has been directly interacted with by the user. after they've tapped on the video, playVideo() should work fine.

do in need to set any permission from devleoper console ?

if this is an ionic question, hopefully those forums can help. i'm not sure.

good luck!