-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed files not being used (will migrate to alternate project) or not working (e.g. things in src/extend) - Renamed demo/intro to demo/tutorial to reflect future renaming of Intro.md to Tutorial.md - Fixed demo to use files in dist/ following change of compile target directory - Figured out how to parse AcFun advanced mode comments. - Separated the Comment object's .align into .align (align mode) and .axis (axis direction) - Enhancements to CommonDanmakuFormat and AcfunFormat
- Loading branch information
Showing
30 changed files
with
728 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,70 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" value="IE=9"> | ||
<link rel="stylesheet" href="../default.css" /> | ||
<link rel="stylesheet" href="../build/base.css" /> | ||
<!-- Files Below May Be Combined/Concated into one on Deployment Servers --> | ||
<script src="../CommentFilter.js"></script> | ||
<script src="../CommentSpaceAllocator.js"></script> | ||
<script src="../CommentCoreLibrary.js"></script> | ||
<!-- A few helpers to do some decoding/fetching below--> | ||
<script src="../libxml.js"></script> | ||
<script src="../parsers/BilibiliFormat.js"></script> | ||
<title>Testrun Player</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" value="IE=9"> | ||
<link rel="stylesheet" href="default.css" /> | ||
<link rel="stylesheet" href="../dist/css/style.css" /> | ||
<script src="../dist/CommentCoreLibrary.js"></script> | ||
<title>Testrun Player</title> | ||
</head> | ||
<body> | ||
<div class="m20 abp" id="player"> | ||
<div id="commentCanvas" class="container"></div> | ||
<video id="abpVideo" height="100%" width="100%" poster="http://content.bitsontherun.com/thumbs/bkaovAYt-720.jpg" controls="none"> | ||
<source src="http://content.bitsontherun.com/videos/bkaovAYt-52qL9xLP.mp4" type="video/mp4"> | ||
<source src="http://content.bitsontherun.com/videos/bkaovAYt-27m5HpIu.webm" type="video/webm"> | ||
<p class="warning">Your browser does not support HTML5 video.</p> | ||
</video> | ||
</div> | ||
<script type="text/javascript"> | ||
var cm = null; | ||
var timer = 0; | ||
function togglePlayback(){ | ||
var videoPlayer = $('abpVideo'); | ||
if (videoPlayer == null) | ||
return; //Called when not fully loaded | ||
if (videoPlayer.paused){ | ||
if(cm != null){ | ||
timer = setInterval(function(){ | ||
cm.time(Math.round(videoPlayer.currentTime * 1000)); | ||
},10); | ||
} | ||
cm.startTimer(); | ||
videoPlayer.play(); | ||
}else{ | ||
if(cm != null){ | ||
cm.stopTimer(); | ||
clearTimeout(timer); | ||
} | ||
videoPlayer.pause(); | ||
} | ||
} | ||
window.addEventListener("load",function(){ | ||
//Hook basics | ||
cm = new CommentManager($('commentCanvas')); | ||
cm.init(); | ||
cm.clear(); | ||
try{ | ||
clearTimeout(timer); | ||
}catch(e){} | ||
$('player').addEventListener("click",function(){ | ||
togglePlayback(); | ||
}); | ||
CommentLoader("../tests/comment.xml",cm,'bilibili'); | ||
cm.startTimer(); | ||
}); | ||
</script> | ||
<div class="m20 abp" id="player"> | ||
<div id="commentCanvas" class="container"></div> | ||
<video id="abpVideo" height="100%" width="100%" poster="http://content.bitsontherun.com/thumbs/bkaovAYt-720.jpg" controls="none"> | ||
<source src="http://content.bitsontherun.com/videos/bkaovAYt-52qL9xLP.mp4" type="video/mp4"> | ||
<source src="http://content.bitsontherun.com/videos/bkaovAYt-27m5HpIu.webm" type="video/webm"> | ||
<p class="warning">Your browser does not support HTML5 video.</p> | ||
</video> | ||
</div> | ||
<script type="text/javascript"> | ||
var $ = function(e) {return document.getElementById(e);}; | ||
var cm = null; | ||
var timer = 0; | ||
function togglePlayback () { | ||
var videoPlayer = $('abpVideo'); | ||
if (videoPlayer == null) { | ||
return; //Called when not fully loaded | ||
} | ||
if (videoPlayer.paused){ | ||
if(cm != null){ | ||
timer = setInterval(function () { | ||
cm.time(Math.round(videoPlayer.currentTime * 1000)); | ||
}, 10); | ||
} | ||
cm.startTimer(); | ||
videoPlayer.play(); | ||
}else{ | ||
if(cm != null){ | ||
cm.stopTimer(); | ||
clearTimeout(timer); | ||
} | ||
videoPlayer.pause(); | ||
} | ||
} | ||
window.addEventListener("load",function () { | ||
//Hook basics | ||
cm = new CommentManager($('commentCanvas')); | ||
cm.init(); | ||
cm.start(); | ||
try{ | ||
clearTimeout(timer); | ||
}catch(e){ | ||
// Foo | ||
} | ||
$('player').addEventListener("click",function(){ | ||
togglePlayback(); | ||
}); | ||
var cp = (new CommentProvider()).addStaticSource( | ||
CommentProvider.XMLProvider("GET", "../test/comment.xml"), | ||
CommentProvider.SOURCE_XML).addParser( | ||
new BilibiliFormat.XMLParser(), | ||
CommentProvider.SOURCE_XML).addTarget(cm); | ||
cp.start().catch(function (e) { | ||
alert(e); | ||
}); | ||
cm.clear(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.