Skip to content

Commit

Permalink
add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
BPing committed May 27, 2017
1 parent b68b3ec commit 6664f90
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
Binary file added img/crysyan-love.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 23 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0, user-scalable=no">

<title>Demo</title>
<script src="lib/jquery-3.1.1.min.js"></script>
Expand All @@ -14,61 +16,64 @@
input[type=button]:hover {
background: rgb(9, 147, 240);
}

button:active,
input[type=button]:active {
background: rgb(10, 118, 190);
}

button[disabled],
input[type=button][disabled] {
background: none;
border: 1px solid rgb(187, 181, 181);
color: gray;
text-shadow: none;
}

body {
background-image: url("img/bg-lesson-begin.jpg");
background-image: url("img/crysyan-love.png");
}
</style>
</head>
<body>

<div style="height:760px;" class="crysyan-designer">
<button type="button" id="start-record">start-record</button>
<button id="stop-record">stop-record</button>
</div>
<div id="videoTag" style="height:500px;"></div>
<div style="height:760px;" class="crysyan-designer">
<button type="button" id="start-record">start-record</button>
<button id="stop-record">stop-record</button>
</div>
<div id="videoTag" style="height:500px;"></div>
</body>

</html>
<script src="js/crysyan-designer.js"></script>
<script>
$(".crysyan-designer").CrysyanDesigner({
projectPath:"",
isRecord:true,
projectPath: "",
isRecord: true,
canvas: {
// px
width: 1000,
height: 600
},
toolbar: {
// widgets: ["CursorWidget", "PencilWidget","ShapeWidget", "EraserWidget", "TextWidget", "UndoWidget", "IndoGoWidget", "ClearWidget"],
// widgets: ["CursorWidget", "PencilWidget","ShapeWidget", "EraserWidget", "TextWidget", "UndoWidget", "IndoGoWidget", "ClearWidget"],

}
}, function(designer) {
}, function (designer) {
console.dir(designer);
var image=new Image();
image.src="http://dream.com:9977/img/pencil.png";
var image = new Image();
image.src = "http://dream.com:9977/img/pencil.png";
console.log(image instanceof Image);
var dataurl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAADFBMVEVYWFhVVVUAAABUVFTqqlXjAAAAA3RSTlMxdACUjPeLAAAATElEQVR42u3SQQrAMAwDQSn7/z+XFExTcOxroN3zgC4STecApy1gpP2gBgZXQMwKwJ23QITYACLlQBC9gAFNwJMXoJhVc7lBA/gsuAArEgqPcT12VgAAAABJRU5ErkJggg=="
designer.drawBackgroupWithImage("../img/pencil.png");

var videoTag=document.getElementById("videoTag");
var videoTag = document.getElementById("videoTag");
var videoEle;
var recorder = designer.getCanvasRecorder();
$("#start-record").click(function () {
document.getElementById('start-record').disabled = true;
document.getElementById('stop-record').disabled = false;
document.getElementById('start-record').innerHTML="Recording";
document.getElementById('start-record').innerHTML = "Recording";
console.log("recording");
if (videoEle instanceof HTMLVideoElement) videoTag.removeChild(videoEle);
recorder.initRecorder();
Expand All @@ -77,9 +82,9 @@
$("#stop-record").click(function () {
document.getElementById('start-record').disabled = false;
document.getElementById('stop-record').disabled = true;
document.getElementById('start-record').innerHTML="start-record";
document.getElementById('start-record').innerHTML = "start-record";
console.log("stop");
recorder.stopRecording(function() {
recorder.stopRecording(function () {
var blob = recorder.getBlob();
videoEle = document.createElement('video');
videoEle.src = URL.createObjectURL(blob);
Expand Down

0 comments on commit 6664f90

Please sign in to comment.