Elian ten Holder
Elian ten Holder

Reputation: 362

Twitter bootstrap carousel youtube video auto start

I have created a Twitter Bootstrap carousel to display pictures and text. So far this goes great. But I would like to add YouTube videos to the slides, I would like the videos to automatically start playing and when the video is finished I would like for the carousel to go to the next slide.

I have tried to accomplish something like this using the YouTube ?autoplay=1 option, but because all the divs are loaded on start up the video starts to play when the page is loaded. I have yet to find anything near a solution for the waiting until video ends problem.

I hope somebody could help me along.

EDIT: http://pastie.org/6348104 That's the code I use for the carousel. The carousel is fully functional but I have the Bootstrap files stored locally.

Upvotes: 0

Views: 3732

Answers (2)

NEO
NEO

Reputation: 1

Add

style="transform: none;"

to your div in modal pop up with class="modal-dialog"

to your modal dialogue

Upvotes: 1

isherwood
isherwood

Reputation: 61055

You'll probably want to attach YouTube's player.playVideo() (example) function as a callback on the carousel('cycle') function.

Upvotes: 2

Related Questions