2

I have built a chromeless player for several websites I run based on the following logic:

1) I create a standard embed as a fallback in the event the chromeless version won't load. This enables ios devices to see the video just fine. 2) I reference a JS file that handles my player controls. In that file, I embed a swf object with:

swfobject.embedSWF("http://www.youtube.com/apiplayer?   
   modestbranding=1&enablejsapi=1&playerapiid=ytplayer", "ytplayer",
   "640", "360", "8", null, null, params);

The swf object I embed overwrites my original embed code. so effectively if the device viewing the page can support flash, chromeless is displayed. If not, it isn't

3) Below this reference, I include the following JS to tell the swf object which video to play:

enter code here
 function onYouTubePlayerReady(playerId) {
     myPlayer = document.getElementById('ytplayer');
     myPlayer.loadVideoById('My_VIDEO_ID', 0);
     myPlayer.mute();
 }

obviously, I replace My_VIDEO_ID with the id of the video i want it to play.

Once this all runs, my video works great EXCEPT the modest branding doesn't work. I've tried this 6 ways from sunday and I have 2 theories. 1) youtube disables modestbranding with a chromeless player or 2) the separation of the swf object and the loading of the video breaks it.

Is there a way to pass the modest parameter in the function call? Are both theories wrong? :)

Any help would be appreciated.

4

1 回答 1

1

遗憾的是,Chromeless 播放器没有“适度品牌”功能。你可以明白为什么没有 chrome 或水印,这个视频就没有属于 YouTube 的迹象。这里有一个关于这个话题的讨论。

于 2011-11-07T12:07:13.843 回答