File tree 3 files changed +16
-1
lines changed
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " videojs-social-share-overlay" ,
3
- "version" : " 0.0.8 " ,
3
+ "version" : " 0.0.9 " ,
4
4
"description" : " Social share overlay for videojs" ,
5
5
"main" : " dist/videojs-social-share-overlay.cjs.js" ,
6
6
"module" : " dist/videojs-social-share-overlay.es.js" ,
Original file line number Diff line number Diff line change @@ -166,17 +166,24 @@ class SocialShareOverlayPlugin {
166
166
}
167
167
168
168
showShareOverlay ( ) {
169
+ const height = this . player . el ( ) . offsetHeight ;
170
+
169
171
this . onSharePausedState = this . player . paused ( ) ;
170
172
this . player . pause ( ) ;
171
173
this . player . addClass ( "vjs-social-share-overlay-open" ) ;
172
174
this . player . trigger ( 'share-overlay-open' ) ;
175
+
176
+ if ( height < 280 ) {
177
+ this . player . addClass ( "vjs-social-share-overlay-minimal" )
178
+ }
173
179
}
174
180
175
181
hideShareOverlay ( ) {
176
182
if ( ! this . onSharePausedState ) {
177
183
this . player . play ( ) ;
178
184
}
179
185
this . player . removeClass ( "vjs-social-share-overlay-open" ) ;
186
+ this . player . removeClass ( "vjs-social-share-overlay-minimal" ) ;
180
187
this . player . trigger ( 'share-overlay-closed' ) ;
181
188
}
182
189
Original file line number Diff line number Diff line change 51
51
.vjs-share-overlay-controls {
52
52
flex : none ;
53
53
max-width : 280px ;
54
+ min-width : 250px ;
54
55
width : 50% ;
55
56
}
56
57
145
146
}
146
147
147
148
}
149
+ & .vjs-social-share-overlay.vjs-social-share-overlay-minimal {
150
+ .vjs-share-overlay {
151
+ .vjs-share-overlay-footer {
152
+ display : none ;
153
+ }
154
+ }
155
+ }
148
156
}
149
157
}
You can’t perform that action at this time.
0 commit comments