Skip to content

MemoriesOff/maskDanmuPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

MaskDanmuPlayer

A smart DanmuPlayer with a function to prevent people from being blocked.

Try the demo here!

Installation

You can use this as standalone es5 bundle like this:

        <link rel="stylesheet" href="src/maskDanmuPlayer.css"/>
	<script src="src/jquery-2.1.4.min.js"></script>
        <script src="src/CommentCoreLibrary.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@1.0.0"></script>
	<script src="src/util.js"></script>
	<script src="src/ModelWeights.js"></script>
	<script src="src/mobileNet.js"></script>
	<script src="src/SemanticSegmentation.js"></script>
        <script src="src/maskDanmuPlayer.js"></script>

For the convenience of debugging, we haven't packaged or compressed the code.

Usage

  <div id="player" style="margin:50px auto;position:relative"></div>
  $('#player').H5Player(
        {
          width: "800" ,
          height: "450", 
          src:"video.mp4",
          comments:"danmu.xml",
          modelAddress:"model.json",
          testcanva:canva
        });

Inputs

  • width the player's width

  • height the player's height. Note:only the video's height, all the player's height will be this add 37px;

  • src the video file route

  • comments the Danmu file route. More information can be find here

  • modelAddress the address of the cheakpoint. you can find one cheakpoint at here.All files in the folder is necessary and the modelAddress means the route of the "model.json". For example, if you want to use our model weight, the modelAddress can be given as "http://www.acgtrip.com/static/semanticDemoweb_model/model.json".

  • testcanva if you want to show the mask layer for test, give the canve object here.

About the Semantic-Segmentation network.

This program use the artificial neural network to get the mask layer, if you want to learn more about the network ,please move on to browser-semantic-segmentation, our sister project.

Acknowledgement

This work use the danmaku comments CommentCoreLibrary

Todo list

  • Mobile Adaptation

License

The program is licensed MIT.

About

A smart DanmuPlayer with a function to prevent people from being blocked by danmu

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors