File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
packages/griffith/src/components Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -221,20 +221,6 @@ class Video extends Component {
221221 }
222222 }
223223
224- handleError = ( ) => {
225- const { onError} = this . props
226- if ( this . isSwitchDefinition ) {
227- this . isSwitchDefinition = false
228- this . props . onEvent (
229- EVENTS . PLAYER . CHANGE_QUALITY_FAIL ,
230- this . props . currentQuality
231- )
232- }
233- if ( onError ) {
234- onError ( this . root . error )
235- }
236- }
237-
238224 handleDurationChange = ( ) => {
239225 const { onDurationChange} = this . props
240226 if ( onDurationChange ) {
@@ -313,6 +299,14 @@ class Video extends Component {
313299 if ( ! dontReportPlayFailed ) {
314300 this . props . onEvent ( EVENTS . PLAYER . PLAY_FAILED , { currentTime} )
315301 }
302+
303+ if ( this . isSwitchDefinition ) {
304+ this . isSwitchDefinition = false
305+ this . props . onEvent (
306+ EVENTS . PLAYER . CHANGE_QUALITY_FAIL ,
307+ this . props . currentQuality
308+ )
309+ }
316310 this . props . onError ( error )
317311 }
318312
You can’t perform that action at this time.
0 commit comments