nl_tokens: Check for mime type support against a player instance Credits : http : // diveintohtml5 . info / everything . html Related : http : // www . leanbackplayer . com / test / h5mt . html
pl_tokens: function mime ( input ) { if ( is$1 . empty ( input ) ) { return false ; } var _input$split = input . split ( '/' ) , _input$split2 = _slicedToArray ( _input$split , 1 ) , mediaType = _input$split2 [ 0 ] ; var type = <mask> ; // Verify we're using HTML5 and there's no media type mismatch if ( ! this . isHTML5 || mediaType !== this . type ) { return false ; } // Add codec if required if ( Object . keys ( defaultCodecs ) . includes ( type ) ) { type += "; codecs=\"" . concat ( defaultCodecs [ input ] , "\"" ) ; } try { return Boolean ( type && this . media . canPlayType ( type ) . replace ( / no / , '' ) ) ; } catch ( e ) { return false ; } }