@@ -131,26 +131,26 @@ const VideoPlayer = {
131
131
*/
132
132
onIframeTitleChange : ( callback ) => {
133
133
const iframe = VideoPlayer . iframe ( )
134
- console . log ( 'iframe' , iframe ) ;
134
+ console . log ( 'iframe' , iframe )
135
135
136
136
if ( iframe ?. contentWindow && iframe ?. contentDocument ) {
137
137
const title = iframe . contentDocument . querySelector ( 'title' )
138
138
139
139
if ( title ) {
140
140
// @ts -expect-error
141
141
const observer = new iframe . contentWindow . MutationObserver ( function ( mutations ) {
142
- console . log ( 'got mutation' , mutations ) ;
142
+ console . log ( 'got mutation' , mutations )
143
143
mutations . forEach ( function ( mutation ) {
144
144
callback ( mutation . target . textContent )
145
145
} )
146
146
} )
147
- console . log ( " watching iframe..." ) ;
147
+ console . log ( ' watching iframe...' )
148
148
observer . observe ( title , { childList : true } )
149
149
} else {
150
- console . warn ( " could not access title in iframe" )
150
+ console . warn ( ' could not access title in iframe' )
151
151
}
152
152
} else {
153
- console . warn ( " could not access iframe?.contentWindow && iframe?.contentDocument" )
153
+ console . warn ( ' could not access iframe?.contentWindow && iframe?.contentDocument' )
154
154
}
155
155
} ,
156
156
@@ -178,9 +178,9 @@ const VideoPlayer = {
178
178
let hasGottenValidVideoTitle = false
179
179
180
180
VideoPlayer . onIframeLoaded ( ( ) => {
181
- console . log ( 'onIframeLoaded' , { hasGottenValidVideoTitle} ) ;
181
+ console . log ( 'onIframeLoaded' , { hasGottenValidVideoTitle } )
182
182
VideoPlayer . onIframeTitleChange ( ( title ) => {
183
- console . log ( 'onIframeTitleChange' , { hasGottenValidVideoTitle, title} ) ;
183
+ console . log ( 'onIframeTitleChange' , { hasGottenValidVideoTitle, title } )
184
184
if ( ! hasGottenValidVideoTitle ) {
185
185
const validTitle = VideoPlayer . getValidVideoTitle ( title )
186
186
0 commit comments