Title: Embed doesn&#039;t work
Last modified: August 22, 2016

---

# Embed doesn't work

 *  Resolved [Hallyunoona](https://wordpress.org/support/users/hallyunoona/)
 * (@hallyunoona)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/embed-doesnt-work/)
 * Hi,
 * I have recently been looking for something that does what your app say’s it does
   so was glad to see this.
 * Unfortunately while I can install the plugin and set up the playlist the embed
   errors, I have been through the code as the previous commenter mentioned and 
   do not seem to have the same issue as him/her? I am not sure if maybe I have 
   just misunderstood the messages.
 * Has the know issue been fixed and if not can you clarify what changes I would
   need to make manually to resolve them.
 * [https://wordpress.org/plugins/youtube-webtv/](https://wordpress.org/plugins/youtube-webtv/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Hallyunoona](https://wordpress.org/support/users/hallyunoona/)
 * (@hallyunoona)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/embed-doesnt-work/#post-5225504)
 * I’ve managed to get this working, but it may have been a bit hacky.
    My problem
   was the videos weren’t loading and my browser’s console was telling me ‘yt_WebTv_channel
   is undefined”.
 * It looks like onYouTubePlayerAPIReady() was triggering before yt_WebTv_channel
   had been defined in the php file somehow.
 * To get it working, I removed:
 *     ```
       function onYouTubePlayerAPIReady() {
           	carica_ytWebTv_playlist(yt_WebTv_channel);
           };
       ```
   
 * from ytWebTV_player.js
    (just to remove the error) then I changed line 108 in
   youtube-web-tv.php from:
 *     ```
       $HTML = '<div id="ytWebTv_player"></div><script>var ytWebTv_channel=' . $id . ';' . load_channel($id) . '</script>';
       ```
   
 * to
 *     ```
       $HTML = '<div id="ytWebTv_player"></div><script>var yt_WebTv_channel=' . $id . ';' . load_channel($id) . 'setTimeout(function() { carica_ytWebTv_playlist(yt_WebTv_channel); }, 500);' . '</script>';
       ```
   
 * so it’s now calling carica_ytWebTv_playlist after half a second.
    I know it’s
   hacky and wouldn’t work if there was a delay loading the youtube API, but it 
   got it working for now!
 * Your plugin is absolutely amazing, thank you for it!

Viewing 1 replies (of 1 total)

The topic ‘Embed doesn't work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/youtube-webtv.svg)
 * [Youtube WebTv](https://wordpress.org/plugins/youtube-webtv/)
 * [Support Threads](https://wordpress.org/support/plugin/youtube-webtv/)
 * [Active Topics](https://wordpress.org/support/plugin/youtube-webtv/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/youtube-webtv/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/youtube-webtv/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Hallyunoona](https://wordpress.org/support/users/hallyunoona/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/embed-doesnt-work/#post-5225504)
 * Status: resolved