nl_tokens: Update <progress > elements
pl_tokens: function updateProgress ( event ) { var _this4 = this ; if ( ! this . supported . ui || ! is$1 . event ( event ) ) { return ; } var value = 0 ; var setProgress = function setProgress ( target , input ) { var value = is$1 . number ( input ) ? input : 0 ; var progress = is$1 . element ( target ) ? target : _this4 . elements . display . buffer ; // Update value and label if ( is$1 . element ( progress ) ) { progress . value = value ; // Update text label inside var label = progress . getElementsByTagName ( 'span' ) [ 0 ] ; if ( is$1 . element ( label ) ) { label . childNodes [ 0 ] . nodeValue = value ; } } } ; if ( event ) { switch ( event . type ) { // Video playing case 'timeupdate' : case 'seeking' : case 'seeked' : value = getPercentage ( this . currentTime , this . duration ) ; // Set seek range value only if it's a 'natural' time event if ( <mask> . type === 'timeupdate' ) { controls . setRange . call ( this , this . elements . inputs . seek , value ) ; } break ; // Check buffer status case 'playing' : case 'progress' : setProgress ( this . elements . display . buffer , this . buffered * 100 ) ; break ; default : break ; } } }