nl_tokens: Examine a { @link Tech } and return a JSON - compatible javascript array that represents the state of all { @link TextTrack } s currently configured . The return array is compatible with { @link text - track - list - converter : jsonToTextTracks } .
pl_tokens: function textTracksToJson ( tech ) { var trackEls = tech . $$ ( 'track' ) ; var trackObjs = Array . prototype . map . <mask> ( trackEls , function ( t ) { return t . track ; } ) ; var tracks = Array . prototype . map . call ( trackEls , function ( trackEl ) { var json = trackToJson_ ( trackEl . track ) ; if ( trackEl . src ) { json . src = trackEl . src ; } return json ; } ) ; return tracks . concat ( Array . prototype . filter . call ( tech . textTracks ( ) , function ( track ) { return trackObjs . indexOf ( track ) === - 1 ; } ) . map ( trackToJson_ ) ) ; }