Comments (8)
You can see an example how its done at http://proloser.github.com/AnythingSlider/video.html
from basic-jquery-slider.
Not a great fix, but I targeted the embed element.
// Custom video click event
if (settings.clickPause && settings.automatic) {
$("embed").click(function () {
if (!paused) {
clearInterval(bjqsInterval);
paused = true;
}
});
}
from basic-jquery-slider.
Oops.. that only works outside of the slider. My mistake!
from basic-jquery-slider.
Hmm serious, even on the basic-slider.com website you are promoting with the fact that video is supported but when you play the video the slideshow just keeps on running... A huge bug I would say...
Anyone any idea?
from basic-jquery-slider.
Here's what I had to do for my video to finally work. It's a bit tedious and maybe unnecessary. I'm hoping someone comes up with a much more elegant way of doing this. Sorry for my hideous "solution".
-
Built custom player with YouTube API. It seemed like the only way I could programmatically target an element within the player (http://demo.tutorialzine.com/2010/07/youtube-api-custom-player-jquery-css/youtube-player.html)
-
Changed a few things in basic-jquery-slider.js
// Added at approx line 238:
// Pause on play
$("#player").click(function () {
if (!paused) {
clearInterval(bjqsInterval);
paused = true;
vblurred = true;
}
});
// Modified at approx line 220:
// Run a bubble-bath and float in that m'fkr like a hovercraft. (enable hover pause)
if (settings.hoverPause && settings.automatic) {
$container.hover(function () {
if (!paused) {
clearInterval(bjqsInterval);
paused = true;
}
}, function () {
if ( vblurred == false) {
if (paused) {
bjqsInterval = setInterval(function () {
bjqsGo(forward)
}, settings.rotationSpeed);
paused = false;
}
}
});
}
// Added the following variable to some functions, so as to reset the pause state (approx lines 99, 107, 194):
vblurred = false;
from basic-jquery-slider.
Thanks for the reply but I'm sorry to have to say that I switched to a different slider. Rhinoslider (http://rhinoslider.com/) in combination with tubeplayer (for easy styling of the youtube player) turned out to be a pretty good out-of-the-box solution.
Hope this issue will be resolved with the basic-jquery-slider though, love the 'basic' approach!
from basic-jquery-slider.
Very cool slider! Thanks marcb12
from basic-jquery-slider.
Hey marc, sorry to hear you've switched to a different slider, but glad you found out to suit your needs.
DeFeNdog is spot on with his solution - the only way to programmatically stop the slider is by using the javascript APIs of the respective video services to embed videos.
Apologies for any inconvenience you had.
from basic-jquery-slider.
Related Issues (20)
- Webapp for slider?
- Additional animations and random animation setting
- Don't need loop
- Not showing if only one <li>
- after refresh, slider not load HOT 1
- How to use twise in same page HOT 3
- Slider doesn't completely eliminate previous image from screen
- Non-minified bjqs.js not working
- IE Compatibility
- How to start with 2nd or 3rd index image. HOT 2
- Index of Current Slide
- Adding callback functions for next and previous
- wrapping image in <a> breaks caption
- Different captions style
- Vertical scroll on touch screens being stopped by slider
- Any chance of a full 2015 update please for this great slider HOT 2
- Last slide AJAX not working when animation set to 'slide'
- Move Numbered slide markers to the top of slider
- Slider responsive, height stuck at image dimensions HOT 1
- simple solution for not showing with one slide and $canvas error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basic-jquery-slider.