Advertisement
Mr_Dullahan

play youtube video

Apr 23rd, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function onYouTubeIframeAPIReady() {
  2. var player;
  3. player = new YT.Player('muteYouTubeVideoPlayer', {
  4. videoId: 'YF7aaw3jYAU', // YouTube Video ID
  5. width: 1, // Player width (in px)
  6. height: 1, // Player height (in px)
  7. playerVars: {
  8. autoplay: 1, // Auto-play the video on load
  9. controls: 1, // Show pause/play buttons in player
  10. showinfo: 0, // Hide the video title
  11. modestbranding: 1, // Hide the Youtube Logo
  12. loop: 1, // Run the video in a loop
  13. fs: 0, // Hide the full screen button
  14. cc_load_policty: 0, // Hide closed captions
  15. iv_load_policy: 3, // Hide the Video Annotations
  16. autohide: 0 // Hide video controls when playing
  17. },
  18. events: {
  19. onReady: function(e) {
  20. e.target.mute();
  21. }
  22. }
  23. });
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement