Skip to content

Commit

Permalink
DRY hlsTypeRE
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed May 2, 2017
1 parent ee07012 commit a1eaa5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/videojs5.hlsjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ function Html5HlsJS(source, tech) {
hls.loadSource(source.src);
}

var hlsTypeRE = /^(application\/x-mpegURL|application\/vnd\.apple\.mpegurl)$/i;

var HlsSourceHandler = {
canHandleSource: function(source) {
var hlsTypeRE = /^(application\/x-mpegURL|application\/vnd\.apple\.mpegurl)$/i;
var hlsExtRE = /\.m3u8/i;

if (source.skipContribHlsJs) {
Expand All @@ -127,7 +128,6 @@ var HlsSourceHandler = {
return new Html5HlsJS(source, tech);
},
canPlayType: function(type) {
var hlsTypeRE = /^application\/x-mpegURL$/i;
if (hlsTypeRE.test(type)) {
return 'probably';
}
Expand Down

0 comments on commit a1eaa5c

Please sign in to comment.