nl_tokens: Get current valid caption tracks If update is false it will also ignore tracks without metadata This is used to freeze the language options when captions . update is false
pl_tokens: function getTracks ( ) { var _this2 = this ; var update = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ; // Handle media or textTracks missing or null var tracks = <mask> . from ( ( this . media || { } ) . textTracks || [ ] ) ; // For HTML5, use cache instead of current tracks when it exists (if captions.update is false) // Filter out removed tracks and tracks that aren't captions/subtitles (for example metadata) return tracks . filter ( function ( track ) { return ! _this2 . isHTML5 || update || _this2 . captions . meta . has ( track ) ; } ) . filter ( function ( track ) { return [ 'captions' , 'subtitles' ] . includes ( track . kind ) ; } ) ; }