Muted Youtube videos
- colin1661music
-
- Posts: 113
- Joined: Sun May 31, 2015 3:49 pm
- Location: London
- Contact:
Muted Youtube videos
Autoplay youtube videos muted
Re: Muted Youtube videos
As far as I know there no mute for YouTube videos:
https://developers.google.com/youtube/p ... ters?hl=en
https://developers.google.com/youtube/p ... ters?hl=en
- colin1661music
-
- Posts: 113
- Joined: Sun May 31, 2015 3:49 pm
- Location: London
- Contact:
Re: Muted Youtube videos
Hi Pablo,
I'm keep trying to make this code work in WYSIWYG
<div id="muteYouTubeVideoPlayer"></div>
<script async src="https://www.youtube.com/iframe_api"></script>
<script>
function onYouTubeIframeAPIReady() {
var player;
player = new YT.Player('muteYouTubeVideoPlayer', {
videoId: 'YOUR_VIDEO_ID', // YouTube Video ID
width: 560, // Player width (in px)
height: 316, // Player height (in px)
playerVars: {
autoplay: 1, // Auto-play the video on load
controls: 1, // Show pause/play buttons in player
showinfo: 0, // Hide the video title
modestbranding: 1, // Hide the Youtube Logo
loop: 1, // Run the video in a loop
fs: 0, // Hide the full screen button
cc_load_policy: 0, // Hide closed captions
iv_load_policy: 3, // Hide the Video Annotations
autohide: 0 // Hide video controls when playing
},
events: {
onReady: function(e) {
e.target.mute();
}
}
});
}
// Written by @labnol
</script>
I'm keep trying to make this code work in WYSIWYG
<div id="muteYouTubeVideoPlayer"></div>
<script async src="https://www.youtube.com/iframe_api"></script>
<script>
function onYouTubeIframeAPIReady() {
var player;
player = new YT.Player('muteYouTubeVideoPlayer', {
videoId: 'YOUR_VIDEO_ID', // YouTube Video ID
width: 560, // Player width (in px)
height: 316, // Player height (in px)
playerVars: {
autoplay: 1, // Auto-play the video on load
controls: 1, // Show pause/play buttons in player
showinfo: 0, // Hide the video title
modestbranding: 1, // Hide the Youtube Logo
loop: 1, // Run the video in a loop
fs: 0, // Hide the full screen button
cc_load_policy: 0, // Hide closed captions
iv_load_policy: 3, // Hide the Video Annotations
autohide: 0 // Hide video controls when playing
},
events: {
onReady: function(e) {
e.target.mute();
}
}
});
}
// Written by @labnol
</script>
Re: Muted Youtube videos
I'm sure but I cannot help you with third party code, for me it may also take serveral hours to figure out how this works.
- BaconFries
-
- Posts: 5648
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Muted Youtube videos
Try the following:
This part isn't really required as you will or most likely be using the YouTube object in the programme.
This part you can add in Page HTML between <head></head>tags*
1) Change the following muteYouTubeVideoPlayer to the <div> ID </div> of the YouTube object which is wb_YouTube1
2) Change player = new YT.Player('muteYouTubeVideoPlayer' to
player = new YT.Player('YouTube1'
3) Change videoId: 'YOUR_VIDEO_ID', to the ID of your YouTube video.
Between <head></head>
All other parameters you can play around with yourself.
This part isn't really required as you will or most likely be using the YouTube object in the programme.
Code: Select all
<div id="muteYouTubeVideoPlayer"></div>
1) Change the following muteYouTubeVideoPlayer to the <div> ID </div> of the YouTube object which is wb_YouTube1
2) Change player = new YT.Player('muteYouTubeVideoPlayer' to
player = new YT.Player('YouTube1'
3) Change videoId: 'YOUR_VIDEO_ID', to the ID of your YouTube video.
Between <head></head>
Code: Select all
<script async src="https://www.youtube.com/iframe_api"></script>
<script>
function onYouTubeIframeAPIReady() {
var player;
player = new YT.Player('muteYouTubeVideoPlayer', {
videoId: 'YOUR_VIDEO_ID', // YouTube Video ID
width: 560, // Player width (in px)
height: 316, // Player height (in px)
playerVars: {
autoplay: 1, // Auto-play the video on load
controls: 1, // Show pause/play buttons in player
showinfo: 0, // Hide the video title
modestbranding: 1, // Hide the Youtube Logo
loop: 1, // Run the video in a loop
fs: 0, // Hide the full screen button
cc_load_policy: 0, // Hide closed captions
iv_load_policy: 3, // Hide the Video Annotations
autohide: 0 // Hide video controls when playing
},
events: {
onReady: function(e) {
e.target.mute();
}
}
});
}
// Written by @labnol
</script>