Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: youtube-video directive won't compile #100

Open
dwilt opened this issue Feb 5, 2016 · 12 comments
Open

bug: youtube-video directive won't compile #100

dwilt opened this issue Feb 5, 2016 · 12 comments
Labels

Comments

@dwilt
Copy link

dwilt commented Feb 5, 2016

I've installed via npm install (and I tried bower first even though I saw your last commit was to try and discourage people from using bower) and I can't get the directive to compile. I can see your script on my page and it's included as a dependency in my app. The <youtube-video video-id="videoId" id="unique-youtube-embed-id-1"></youtube-video> is just sitting in the DOM uncompiled.

No errors are being thrown in the console.

Here's how I'm including it in my project:

import '../node_modules/angular-youtube-embed/dist/angular-youtube-embed.min.js';

angular.module('myApp', [

        // App Plugins
        'ionic',
        'youtube-embed'
    ])

I'd prefer to bower install it and include it as a external script on my page as the I've done with the rest of my front end packages but I'm fine as long as it works.

Thanks for any help!

@brandly
Copy link
Owner

brandly commented Feb 5, 2016

try something like

import youtubeEmbed from 'angular-youtube-embed'

angular.module('myApp', [
  'ionic',
  youtubeEmbed
])

basically, imports are aware of node_modules, so you shouldn't have to specify a relative path like that. on my end, we declare a main, which points to this file. that file basically loads the directive and exports the necessary dependency string.

let me know if you get this working!

@dwilt
Copy link
Author

dwilt commented Feb 5, 2016

still didn't work, no errors either. Both ways I can see the file is being included on the page so it really shouldn't matter how it's getting in there no? I mean, angular isn't even throwing errors. It sees your module is attached. Let me know if you're interested in a screenshare.

@brandly
Copy link
Owner

brandly commented Feb 5, 2016

didn't notice your note about bower. it's published there too. (make sure you get that name right 😄)

@dwilt
Copy link
Author

dwilt commented Feb 5, 2016

I did, haha I saw it was a bit different cause of another library. Any more ideas why this wouldn't work?

@brandly
Copy link
Owner

brandly commented Feb 7, 2016

it's hard to say. there haven't been any new releases with this project, and i've seen this code installed with npm and used. maybe there's a small chance something with npm3 broke this package.

otherwise, it's hard to diagnose. with the number of JS tools out there, it's hard to determine who's at fault here.

could you .zip up some code and share it?

@dwilt
Copy link
Author

dwilt commented Feb 8, 2016

This is a private app that we're working on and I'd prefer to show you the code privately. Could you do a screenshare?

@brandly brandly added the help label Feb 12, 2016
@ashish367
Copy link

hey Iam also facing same error plz help me Asap

@brandly
Copy link
Owner

brandly commented Jul 30, 2016

@ashish367 any details on what's happening? is the code for the directive not getting included in your bundle? is it included by not initializing properly?

@dwilt did you get this working?

@dwilt
Copy link
Author

dwilt commented Jul 31, 2016

I can't remember now as I'm on a different project but if I remember correctly we were unable to get this to work

@brandly
Copy link
Owner

brandly commented Jul 31, 2016

@dwilt sorry to hear that!!

@ashish367 are you including the YouTube iframe API as shown here? as of v1.3.1, you should see a message in your console if the YouTube library is not included.

@ashish367
Copy link

Hi,
I found this error some video are not embed due to video restriction by
owner so iam trying to add origin:"www.youtube.com
http://www.youtube.com" but i failed *
*Error on Console:

www-widgetapi.js:27 Failed to execute 'postMessage' on 'DOMWindow': The
target origin provided ('https://www.youtube.com
https://www.youtube.com') does not match the recipient window's origin

Iam trying to embed this video on my cordova project on my webview
"https://www.youtube.com/embed/eI6T19qPx2Q?enablejsapi=1
https://www.youtube.com/embed/eI6T19qPx2Q?enablejsapi=1"

Regards,
Ashish Yadav
CM Software Services Pvt. Ltd.
Email: ashish.yadav@cmss.in
Mobile: +91 9702099924
Website: www.cmss.in

On Sun, Jul 31, 2016 at 9:51 PM, Matthew Brandly notifications@github.com
wrote:

@dwilt https://github.com/dwilt sorry to hear that!!

@ashish367 https://github.com/ashish367 are you including the YouTube
iframe API as shown here
https://github.com/brandly/angular-youtube-embed#can-i-use-it? as of
v1.3.1, you should see a message in your console if the YouTube library
is not included.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#100 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATrwqhmDbcXxYiUkAELf8eItNGA6neM2ks5qbMumgaJpZM4HUnQf
.

@ashish367
Copy link

forgot to mention Thanks and please have any suggestion how to embed
restriction video also plz

Regards,
Ashish Yadav
CM Software Services Pvt. Ltd.
Email: ashish.yadav@cmss.in
Mobile: +91 9702099924
Website: www.cmss.in

On Mon, Aug 1, 2016 at 12:23 PM, Ashish Yadav ashish.yadav@cmss.in wrote:

Hi,
I found this error some video are not embed due to video restriction by
owner so iam trying to add origin:"www.youtube.com
http://www.youtube.com" but i failed *
*Error on Console:

www-widgetapi.js:27 Failed to execute 'postMessage' on 'DOMWindow': The
target origin provided ('https://www.youtube.com
https://www.youtube.com') does not match the recipient window's origin

Iam trying to embed this video on my cordova project on my webview "https://www.youtube.com/embed/eI6T19qPx2Q?enablejsapi=1
https://www.youtube.com/embed/eI6T19qPx2Q?enablejsapi=1"

Regards,
Ashish Yadav
CM Software Services Pvt. Ltd.
Email: ashish.yadav@cmss.in
Mobile: +91 9702099924
Website: www.cmss.in

On Sun, Jul 31, 2016 at 9:51 PM, Matthew Brandly <notifications@github.com

wrote:

@dwilt https://github.com/dwilt sorry to hear that!!

@ashish367 https://github.com/ashish367 are you including the YouTube
iframe API as shown here
https://github.com/brandly/angular-youtube-embed#can-i-use-it? as of
v1.3.1, you should see a message in your console if the YouTube library
is not included.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#100 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATrwqhmDbcXxYiUkAELf8eItNGA6neM2ks5qbMumgaJpZM4HUnQf
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants