Skip to content

Commit

Permalink
HTML5单独模块的访问
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinywan committed Sep 27, 2016
1 parent 6dd0ec0 commit 9234d91
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions Backend/Html5/View/Sewise/liveM3u8.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>Sewise M3U8 src方式嵌入播放</title>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
}
</style>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
</head>
<body>
<div style="width: 700px; height: 300px; ">
<script type="text/javascript" src="http://jackzhang1204.github.io/sewise/sewise_player/player/sewise.player.min.js"></script>
<script type="text/javascript">
var letvURL = "http://cdn1.amailive.com/hls/001.m3u8";
var youkuURL = "http://cdn1.amailive.com/hls/002.m3u8";
var letvTitle = "播放001 M3U8";
var youkuTitle = "播放002 M3U8";
SewisePlayer.setup({
server: "vod",
type: "m3u8",
videourl: letvURL,
skin: "vodWhite",
claritybutton: "disable",
title: letvTitle,
lang: 'zh_CN'
});
$(document).ready(function(){
$("#switch").text(youkuTitle);
$("#switch").click(function(e){
if($("#switch").text() == youkuTitle){
SewisePlayer.toPlay(youkuURL, youkuTitle, 0, true);
$("#switch").text(letvTitle);
}else{
SewisePlayer.toPlay(letvURL, letvTitle, 0, true);
$("#switch").text(youkuTitle);
}
});
});
</script>
</div>
<div style="padding: 20px;"><button id="switch" style="width: 120px; height: 30px; "></button></div>
<div style="padding: 10px;float: left;">注:如果当前设备为Mobile平台,播放器将自动启用HTML5播放模块播放m3u8文件。</div>
</body>
</html>

0 comments on commit 9234d91

Please sign in to comment.