From 94e0b530868c56547ee05e84534fa68a1f6346f7 Mon Sep 17 00:00:00 2001 From: "smain@google.com" Date: Tue, 16 Dec 2014 19:07:08 -0800 Subject: [PATCH] fix bug that allowed only one video in the shadowbox per page bug: 18777918 Change-Id: I07c75f795128165e2f1472112cf8ba1a1ee782c7 --- tools/droiddoc/templates-sdk/assets/js/docs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js index 69090a3da9..c35de27fe1 100644 --- a/tools/droiddoc/templates-sdk/assets/js/docs.js +++ b/tools/droiddoc/templates-sdk/assets/js/docs.js @@ -642,6 +642,10 @@ function startYouTubePlayer(videoId) { } else { // reset the size in case the user adjusted the window since last play youTubePlayer.setSize(videoWidth, videoHeight); + // if a video different from the one already playing was requested, cue it up + if (videoId != youTubePlayer.getVideoUrl().split('?v=')[1]) { + youTubePlayer.cueVideoById(videoId); + } youTubePlayer.playVideo(); } }