File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 161
161
return this . videoFullScreen . height ;
162
162
}
163
163
164
- /**
164
+ function notifyParent ( fullscreenOpen ) {
165
+ if ( window !== window . parent ) {
166
+ // This is used by the Learning MFE to know about changing fullscreen mode.
167
+ // The MFE is then able to respond appropriately and scroll window to the previous position.
168
+ window . parent . postMessage ( {
169
+ type : 'plugin.videoFullScreen' ,
170
+ payload : {
171
+ open : fullscreenOpen
172
+ }
173
+ } , document . referrer
174
+ ) ;
175
+ }
176
+ }
177
+
178
+ /**
165
179
* Event handler to toggle fullscreen mode.
166
180
* @param {jquery Event } event
167
181
*/
192
206
this . resizer . delta . reset ( ) . setMode ( 'width' ) ;
193
207
}
194
208
this . el . trigger ( 'fullscreen' , [ this . isFullScreen ] ) ;
209
+
210
+ this . videoFullScreen . notifyParent ( false ) ;
195
211
}
196
212
197
213
function handleEnter ( ) {
202
218
return ;
203
219
}
204
220
221
+ this . videoFullScreen . notifyParent ( true ) ;
222
+
205
223
this . videoFullScreen . fullScreenState = this . isFullScreen = true ;
206
224
fullScreenClassNameEl . addClass ( 'video-fullscreen' ) ;
207
225
this . videoFullScreen . fullScreenEl
267
285
handleFullscreenChange : handleFullscreenChange ,
268
286
toggle : toggle ,
269
287
toggleHandler : toggleHandler ,
270
- updateControlsHeight : updateControlsHeight
288
+ updateControlsHeight : updateControlsHeight ,
289
+ notifyParent : notifyParent
271
290
} ;
272
291
273
292
state . bindTo ( methodsDict , state . videoFullScreen , state ) ;
You can’t perform that action at this time.
0 commit comments