jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

Allowing nested selectors with cssSelectorAncestor #342

Closed ReactiveRaven closed 3 years ago

ReactiveRaven commented 8 years ago

https://github.com/happyworm/jPlayer/issues/341

Allows selectors for play/pause buttons etc with css groups (ie: ".play, .pause, .stop") which were previously being interpreted as "#ancestor .play, .pause, .stop", ie:

#ancestor .play,
.pause,
.stop

which caused the .pause and .stop buttons to bind to all players on the page.

context also updated to retain old behaviour.

thepag commented 8 years ago

Not sure why you need this. jPlayer already works in the way you describe. http://jplayer.org/latest/developer-guide/#jPlayer-predefined-css-selectors

ReactiveRaven commented 8 years ago

Yeah, I guess I chose bad examples here with the classes, the actual issue we have is multiple play/pause buttons in different places on the page. So we have one in the controls beneath a video, one over the video initially, another one when zooming the video to cover the page, that kind of thing. I was doing this with someone my ride waiting outside of work, sorry :)

So, with an example like:

the constructed selector looks like: #ancestor .control-play, .cover-play, .zoom-play - which selects like:

#ancestor .control-play,
.cover-play,
.zoom-play

Hope that makes more sense!