File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 103103 this . playsInline = '0' ;
104104 }
105105
106+ // poster (Boolean, indicating whether media element has a poster attribute)
107+ if ( $ ( media ) . attr ( 'poster' ) ) {
108+ this . hasPoster = true ;
109+ }
110+ else {
111+ this . hasPoster = false ;
112+ }
113+
106114 // start-time
107115 if ( $ ( media ) . data ( 'start-time' ) !== undefined && $ . isNumeric ( $ ( media ) . data ( 'start-time' ) ) ) {
108116 this . startTime = $ ( media ) . data ( 'start-time' ) ;
31713179
31723180 this . injectOffscreenHeading ( ) ;
31733181
3174- // youtube adds its own big play button
3175- // if (this.mediaType === 'video' && this.player !== 'youtube') {
31763182 if ( this . mediaType === 'video' ) {
3177- if ( this . iconType != 'image' && this . player !== 'youtube' ) {
3183+ // youtube adds its own big play button
3184+ // don't show ours *unless* video has a poster attribute
3185+ // (which obstructs the YouTube poster & big play button)
3186+ if ( this . iconType != 'image' && ( this . player !== 'youtube' || this . hasPoster ) ) {
31783187 this . injectBigPlayButton ( ) ;
31793188 }
31803189
34653474 height = 'auto' ;
34663475 }
34673476
3468- if ( this . $media . attr ( 'poster' ) ) {
3477+ if ( this . hasPoster ) {
34693478 poster = this . $media . attr ( 'poster' ) ;
34703479 this . $posterImg = $ ( '<img>' , {
34713480 'class' : 'able-poster' ,
Original file line number Diff line number Diff line change 103103 this . playsInline = '0' ;
104104 }
105105
106+ // poster (Boolean, indicating whether media element has a poster attribute)
107+ if ( $ ( media ) . attr ( 'poster' ) ) {
108+ this . hasPoster = true ;
109+ }
110+ else {
111+ this . hasPoster = false ;
112+ }
113+
106114 // start-time
107115 if ( $ ( media ) . data ( 'start-time' ) !== undefined && $ . isNumeric ( $ ( media ) . data ( 'start-time' ) ) ) {
108116 this . startTime = $ ( media ) . data ( 'start-time' ) ;
31713179
31723180 this . injectOffscreenHeading ( ) ;
31733181
3174- // youtube adds its own big play button
3175- // if (this.mediaType === 'video' && this.player !== 'youtube') {
31763182 if ( this . mediaType === 'video' ) {
3177- if ( this . iconType != 'image' && this . player !== 'youtube' ) {
3183+ // youtube adds its own big play button
3184+ // don't show ours *unless* video has a poster attribute
3185+ // (which obstructs the YouTube poster & big play button)
3186+ if ( this . iconType != 'image' && ( this . player !== 'youtube' || this . hasPoster ) ) {
31783187 this . injectBigPlayButton ( ) ;
31793188 }
31803189
34653474 height = 'auto' ;
34663475 }
34673476
3468- if ( this . $media . attr ( 'poster' ) ) {
3477+ if ( this . hasPoster ) {
34693478 poster = this . $media . attr ( 'poster' ) ;
34703479 this . $posterImg = $ ( '<img>' , {
34713480 'class' : 'able-poster' ,
Original file line number Diff line number Diff line change 11{
22 "name" : " ableplayer" ,
3- "version" : " 3.2.9 " ,
3+ "version" : " 3.2.10 " ,
44 "description" : " fully accessible HTML5 media player" ,
55 "homepage" : " http://ableplayer.github.io/ableplayer" ,
66 "bugs" : " https://github.com/ableplayer/ableplayer/issues" ,
Original file line number Diff line number Diff line change 103103 this . playsInline = '0' ;
104104 }
105105
106+ // poster (Boolean, indicating whether media element has a poster attribute)
107+ if ( $ ( media ) . attr ( 'poster' ) ) {
108+ this . hasPoster = true ;
109+ }
110+ else {
111+ this . hasPoster = false ;
112+ }
113+
106114 // start-time
107115 if ( $ ( media ) . data ( 'start-time' ) !== undefined && $ . isNumeric ( $ ( media ) . data ( 'start-time' ) ) ) {
108116 this . startTime = $ ( media ) . data ( 'start-time' ) ;
Original file line number Diff line number Diff line change 3737
3838 this . injectOffscreenHeading ( ) ;
3939
40- // youtube adds its own big play button
41- // if (this.mediaType === 'video' && this.player !== 'youtube') {
4240 if ( this . mediaType === 'video' ) {
43- if ( this . iconType != 'image' && this . player !== 'youtube' ) {
41+ // youtube adds its own big play button
42+ // don't show ours *unless* video has a poster attribute
43+ // (which obstructs the YouTube poster & big play button)
44+ if ( this . iconType != 'image' && ( this . player !== 'youtube' || this . hasPoster ) ) {
4445 this . injectBigPlayButton ( ) ;
4546 }
4647
331332 height = 'auto' ;
332333 }
333334
334- if ( this . $media . attr ( 'poster' ) ) {
335+ if ( this . hasPoster ) {
335336 poster = this . $media . attr ( 'poster' ) ;
336337 this . $posterImg = $ ( '<img>' , {
337338 'class' : 'able-poster' ,
Original file line number Diff line number Diff line change 9494 position : absolute;
9595 top : 0 ;
9696 left : 0 ;
97+ width : 100% ;
98+ }
99+ .able .able-vidcap-container {
100+ overflow : hidden;
97101}
98102
99103/*
You can’t perform that action at this time.
0 commit comments