Playing YouTube music

Do you want to share WYSIWYG Web Builder tips, tricks, tutorials or useful HTML code? You can post it here...
(no questions or problems please, this section is not monitored by support).
Forum rules
This section is to share tips, tricks and tutorials related to WYSIWYG Web Builder.
Please do not post questions or problems here. They will not be answered.

Post Reply
User avatar
Posts: 685
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia

Playing YouTube music

Post by alex4orly » Mon Nov 13, 2017 8:09 am

I have been working on this idea for a while, now that it is completed I am sharing it with you, in case anyone needs it and will be happy to get your feedback. Have a look at the following URL:

This HTML page is the front end for the engine. It has a Layout grid in 3 parts, each has an IFrame in it
Each iFrame loads a Blog Object
Each Item in the blog points to an external URL and passes into it a parameter which is the YouTube Clip / VIDEO ID
The code for the engine itself is all in Javascript and using the YouTube API...


<!doctype html>
<meta charset="utf-8">
<meta name="generator" content="WYSIWYG Web Builder 12 -">
<link href="MasterFrame.css" rel="stylesheet">
<link href="music.css" rel="stylesheet">
<div id="ytplayer"></div>

var YTautostart = '1';
function GetURLParameter(sParam)
var sPageURL =;
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
var sParameterName = sURLVariables.split('=');
if (sParameterName[0] == sParam)
//return sParameterName[1];
return decodeURIComponent(sParameterName[1]);
{ // default clip - Andre Rieu
YTautostart = '1';
return "7UFmwArST-I";

var YTclip = GetURLParameter('clip');

// Load the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

// Replace the 'ytplayer' element with an <iframe> and
// YouTube player after the API code downloads.
var player;
function onYouTubePlayerAPIReady()
player = new YT.Player('ytplayer',
height: '80',
width: '400',
frameborder: '2',
playerVars: {autoplay:1, rel:0, fs:0},
videoId: YTclip

User avatar
Posts: 4363
Joined: Thu Aug 16, 2007 7:32 pm

Re: Playing YouTube music

Post by BaconFries » Mon Nov 13, 2017 8:16 am

Is this is to show or ask for opinions of your site maybe how to improve or what needs changing or are you providing a tip if it is a tip then please post at the following:

Posts: 36
Joined: Fri Jul 21, 2017 5:36 pm

Re: Playing YouTube music

Post by gano101 » Mon Nov 13, 2017 9:19 am

as a music playing site, it works very well.

there's not a lot going on while the music is playing, perhaps you could have a slide show in the background or even have the youtube video play full-screen in the BG.

if I'm being honest, I don't see why somebody wouldn't just go to youtube :?:

User avatar
Posts: 685
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia

Re: Playing YouTube music

Post by alex4orly » Mon Nov 13, 2017 11:08 am

Baconfries, it is just a tip. How do I move the post then?

Regarding "why somebody wouldn't just go to youtube..." this website is for my retirement village, mid 70's ++ computer literacy is almost non existant... I managed to get some of them (around 80 out of 400 residents) to visit the website and let them ask for functionality, this music player was just a recent request. To you and I, going to YouTube and doing a search for Frank Sinatra is very clear... for them it is not


Post Reply