File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
administration/static/app/controllers Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 5050
5151 $scope . play = function ( youtube_id ) {
5252 youtubePlayerApi . loadPlayer ( ) . then ( function ( player ) {
53- if ( player . getVideoData ( ) . video_id === youtube_id ) return ;
53+ if ( player . getVideoData && player . getVideoData ( ) . video_id === youtube_id ) return ;
5454 player . cueVideoById ( youtube_id ) ;
5555 } ) ;
5656 } ;
Original file line number Diff line number Diff line change 6262 $scope . section = 'video' ;
6363
6464 youtubePlayerApi . loadPlayer ( ) . then ( function ( player ) {
65- if ( player . getVideoData ( ) &&
66- player . getVideoData ( ) . video_id === youtube_id ) return ;
67- player . cueVideoById ( youtube_id ) ;
65+ if ( player . getVideoData && player . getVideoData ( ) &&
66+ player . getVideoData ( ) . video_id === youtube_id ) return ;
67+ player . cueVideoById ( youtube_id ) ;
6868 } ) ;
6969 } else {
7070 if ( $scope . currentUnit . content ) {
346346 var lastState = - 1 ;
347347
348348 function onPlayerStateChange ( event ) {
349- var video_id = event . target . getVideoData ( ) . video_id ;
350349
351350 if ( event . data == YT . PlayerState . ENDED ) {
352351 if ( ! ( lastState === YT . PlayerState . PAUSED || // workaround, YT in html5 mode will fire
You can’t perform that action at this time.
0 commit comments