-
Notifications
You must be signed in to change notification settings - Fork 22
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
Some docs and usage examle #4
Comments
I made a fork that does a nice two-way binding and has usage examples. |
The API YT player is quite similar to the embeded one but this one does have a control to stop and play the video and more. I didn't manage to get the embedable player to do the same. However I had issues with getting this player to initialise quick enough for me. So I am using the much simpler embeded player and setting the video to a fake video id does indeed stop the video from playing ! |
@landed1 I added some documentation about controlling the player: https://github.com/brandly/angular-youtube#events-and-player-controls You could stop the player from within a controller. myApp.controller('MyCtrl', function ($scope, $youtube) {
$scope.stopPlayer = function () {
$youtube.player.stopVideo();
};
}); @arnaudbreton I've made quite a few changes already, and I'm considering more. If you'd like me to open a pull request for any or all of these changes, I'd be happy to! Otherwise, I might break off into my own repo, since I can't file issues or anything on a forked repo. 🍴 |
@brandly Yes I would be happy to review and merge your PR in the main repo! Feel free to submit them. Thanks for your contribution. |
I browser you code, and it seems to me that your service produces an instance of a video using the YouTube JS api statically.
Which is basically the same is using an embed flash player.
And won't allow users to add their own video for instance.
Instead of creating the video instance at the link function of the directive, perhaps it could be nice to pass it as a 2-way-bind attribute.
I can implement something like this and open a PR, if you are interested.
Also, regardless of the usage example for the existing code could be great, thanks 👍
The text was updated successfully, but these errors were encountered: