am b2eaef29: am bcca18bf: am 43fbdb2a: am dc8a05ca: am 570c2210: add support for shadowbox videos with start time specified with #t= in video url
* commit 'b2eaef295633a3be2809c8040215f266e42d3a15': add support for shadowbox videos with start time specified with #t= in video url
This commit is contained in:
commit
7fcb9209ac
|
@ -593,11 +593,17 @@ function onYouTubeIframeAPIReady() {
|
|||
}
|
||||
|
||||
function startYouTubePlayer(videoId) {
|
||||
var idAndHash = videoId.split("#");
|
||||
var startTime = 0;
|
||||
if (idAndHash.length > 1) {
|
||||
startTime = idAndHash[1].split("t=")[1] != undefined ? idAndHash[1].split("t=")[1] : 0;
|
||||
}
|
||||
if (youTubePlayer == null) {
|
||||
youTubePlayer = new YT.Player('youTubePlayer', {
|
||||
height: '529',
|
||||
width: '940',
|
||||
videoId: videoId,
|
||||
videoId: idAndHash[0],
|
||||
playerVars: {start: startTime},
|
||||
events: {
|
||||
'onReady': onPlayerReady,
|
||||
'onStateChange': onPlayerStateChange
|
||||
|
|
Loading…
Reference in New Issue