Skip to content

Commit

Permalink
Update player.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fanmingming authored Nov 25, 2022
1 parent 1df7115 commit fe4d093
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions player/player.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
var video = document.getElementById('video');
var vurl = location.search.split('vurl=')[1];


var videoSrc = vurl;
//
// First check for native browser HLS support
//
// 检查浏览器是否支持HLS
if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = videoSrc;
//
// If no native HLS support, check if HLS.js is supported
//
// 如不支持则调用HLS.js
} else if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(videoSrc);
Expand Down

0 comments on commit fe4d093

Please sign in to comment.