2021-12-08 11:40:45 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en" dir="ltr">
|
|
|
|
|
|
|
|
<head>
|
2021-12-20 12:36:18 +00:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Annotate a line animation</title>
|
|
|
|
<style media="screen">
|
|
|
|
body {
|
|
|
|
/* background: black;
|
|
|
|
color: white */
|
|
|
|
background: lightgray;
|
|
|
|
}
|
|
|
|
|
|
|
|
#sample,
|
|
|
|
svg {
|
|
|
|
position: absolute;
|
|
|
|
top: 20px;
|
|
|
|
left: 20px;
|
|
|
|
width: calc(100% - 40px);
|
|
|
|
height: calc(100% - 200px);
|
|
|
|
font-family: sans-serif;
|
|
|
|
z-index: 2;
|
|
|
|
/* background: white; */
|
|
|
|
/* border: solid 2px lightgray; */
|
|
|
|
}
|
|
|
|
|
|
|
|
svg .background {
|
|
|
|
fill: white
|
|
|
|
}
|
|
|
|
|
|
|
|
img {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
path {
|
|
|
|
fill: none;
|
|
|
|
stroke: gray;
|
|
|
|
stroke-width: 1mm;
|
|
|
|
stroke-linecap: round;
|
|
|
|
}
|
|
|
|
|
|
|
|
g.before path {
|
2021-12-08 11:40:45 +00:00
|
|
|
opacity: 0.5;
|
|
|
|
stroke: gray !important;
|
|
|
|
}
|
2021-12-20 12:36:18 +00:00
|
|
|
|
|
|
|
g.after path,
|
|
|
|
path.before_in {
|
|
|
|
opacity: .1;
|
2021-12-08 11:40:45 +00:00
|
|
|
stroke: gray !important;
|
2021-12-20 12:36:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#wrapper {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
background: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gray {
|
|
|
|
position: absolute;
|
|
|
|
background: rgba(255, 255, 255, 0.7);
|
|
|
|
}
|
|
|
|
|
2021-12-21 13:31:02 +00:00
|
|
|
|
2022-04-19 11:29:26 +00:00
|
|
|
.controls--playback{
|
|
|
|
/* display:flex; */
|
|
|
|
}
|
|
|
|
|
|
|
|
.timecode{
|
|
|
|
position: absolute;
|
|
|
|
right: 100%;
|
|
|
|
width: 5%;
|
|
|
|
font-size:8px;
|
|
|
|
}
|
2021-12-20 12:36:18 +00:00
|
|
|
|
2022-04-19 11:29:26 +00:00
|
|
|
.controls--playback input[type='range'] {
|
2021-12-20 12:36:18 +00:00
|
|
|
/* position: absolute;
|
|
|
|
z-index: 100;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0; */
|
|
|
|
width: 100%;
|
2022-04-19 11:29:26 +00:00
|
|
|
|
2021-12-20 12:36:18 +00:00
|
|
|
}
|
|
|
|
|
2021-12-23 14:54:03 +00:00
|
|
|
.controls button.paused, .controls button.playing{
|
|
|
|
position: absolute;
|
|
|
|
left: 100%;
|
|
|
|
width: 30px;
|
|
|
|
}
|
|
|
|
.controls button.paused::before{
|
|
|
|
content: '⏵';
|
|
|
|
}
|
|
|
|
.controls button.playing::before{
|
|
|
|
content: '⏸';
|
|
|
|
}
|
|
|
|
|
2021-12-20 12:36:18 +00:00
|
|
|
.controls {
|
|
|
|
position: absolute !important;
|
|
|
|
z-index: 100;
|
|
|
|
bottom: 10px;
|
|
|
|
left: 5%;
|
|
|
|
right: 0;
|
|
|
|
width: 90%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.scrubber {}
|
|
|
|
|
|
|
|
.tags {
|
|
|
|
line-height: 40px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2022-04-29 10:05:48 +00:00
|
|
|
.tags .tag {
|
2021-12-20 12:36:18 +00:00
|
|
|
display: block;
|
|
|
|
padding: 5px;
|
|
|
|
border: solid 1px darkgray;
|
|
|
|
flex-grow: 1;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
2022-04-29 10:05:48 +00:00
|
|
|
.tags li{
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.tags .subtags{
|
|
|
|
padding:0;
|
|
|
|
font-size: 80%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
.tags .subtags .tag{
|
|
|
|
padding: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tags .tag:hover {
|
2021-12-20 12:36:18 +00:00
|
|
|
cursor: pointer;
|
|
|
|
background: darkgray;
|
|
|
|
}
|
|
|
|
|
2022-04-29 10:05:48 +00:00
|
|
|
.tags .tag.selected {
|
|
|
|
background: #3FB8AF;
|
2021-12-20 12:36:18 +00:00
|
|
|
}
|
|
|
|
|
2022-04-29 10:05:48 +00:00
|
|
|
.tags .tag.annotation-rm {
|
2021-12-20 12:36:18 +00:00
|
|
|
/* display: none; */
|
|
|
|
overflow: hidden;
|
|
|
|
color: red;
|
|
|
|
font-size: 30px;
|
|
|
|
width: 0;
|
|
|
|
flex-grow: 0;
|
|
|
|
padding: 5px 0;
|
|
|
|
transition: width .3s;
|
|
|
|
pointer-events: none;
|
|
|
|
border: none;
|
2021-12-21 13:31:02 +00:00
|
|
|
direction: rtl;
|
|
|
|
/* hide behind bar, instead into nothing */
|
2021-12-20 12:36:18 +00:00
|
|
|
}
|
|
|
|
|
2022-04-29 10:05:48 +00:00
|
|
|
.selected-annotation .tags .tag.annotation-rm {
|
2021-12-20 12:36:18 +00:00
|
|
|
color: red;
|
|
|
|
display: block;
|
|
|
|
width: 30px;
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
2022-05-02 20:49:56 +00:00
|
|
|
.noUi-handle:focus{
|
|
|
|
/* background: red;; */
|
|
|
|
border: solid 2px #601be0;
|
|
|
|
|
|
|
|
}
|
|
|
|
/* .noUi-handle:focus::before, .noUi-handle:focus::after{
|
|
|
|
background: #601be0;
|
|
|
|
} */
|
|
|
|
|
2022-04-29 10:05:48 +00:00
|
|
|
.tags .tag span {
|
2021-12-20 12:36:18 +00:00
|
|
|
display: inline-block;
|
|
|
|
width: 20px;
|
|
|
|
height: 20px;
|
|
|
|
margin-right: 10px;
|
|
|
|
vertical-align: middle;
|
|
|
|
border-radius: 5px;
|
|
|
|
}
|
2022-04-29 10:05:48 +00:00
|
|
|
.tags .subtags .tag span{
|
|
|
|
width: 10px;
|
|
|
|
height: 10px;
|
|
|
|
margin-right: 2px;
|
|
|
|
|
|
|
|
}
|
2021-12-20 12:36:18 +00:00
|
|
|
|
|
|
|
.annotations {
|
2022-04-29 10:05:48 +00:00
|
|
|
height: 30px;
|
2021-12-20 12:36:18 +00:00
|
|
|
/* border: solid 1px darkgray; */
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotations>div {
|
|
|
|
opacity: .4;
|
|
|
|
background: lightseagreen;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotations>div:hover,
|
|
|
|
.annotations>div.selected {
|
|
|
|
opacity: 1;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.unsaved::before {
|
|
|
|
content: '*';
|
|
|
|
color: red;
|
|
|
|
display: inline-block;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 30px;
|
|
|
|
position: absolute;
|
|
|
|
top: 10px;
|
|
|
|
left: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.saved::before {
|
|
|
|
content: '\2713';
|
|
|
|
display: inline-block;
|
|
|
|
color: green;
|
|
|
|
text-align: center;
|
|
|
|
font-size: 30px;
|
|
|
|
position: absolute;
|
|
|
|
top: 10px;
|
|
|
|
left: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.noUi-horizontal .noUi-touch-area {
|
|
|
|
cursor: ew-resize;
|
|
|
|
}
|
2022-04-19 11:29:26 +00:00
|
|
|
#interface .noUi-horizontal .noUi-tooltip{
|
|
|
|
/* tooltips go below the buttons */
|
|
|
|
bottom:auto;
|
|
|
|
top:110%;
|
|
|
|
}
|
2021-12-22 10:52:38 +00:00
|
|
|
|
|
|
|
.audioconfig{
|
|
|
|
z-index: 9;
|
|
|
|
background:black;
|
|
|
|
color: white;
|
|
|
|
position: relative;
|
|
|
|
width: 100px; /* as wide as audio controls only */
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
.audioconfig:hover{
|
|
|
|
width: auto;
|
|
|
|
}
|
|
|
|
.audioconfig select, .audioconfig input{
|
|
|
|
margin:10px;
|
|
|
|
}
|
|
|
|
audio{
|
|
|
|
vertical-align: middle;
|
|
|
|
width: 100px; /* hides seek head */
|
|
|
|
}
|
2021-12-23 14:54:03 +00:00
|
|
|
|
2022-02-03 16:39:59 +00:00
|
|
|
.playlist img{
|
|
|
|
position: static;
|
|
|
|
width: 250px;
|
|
|
|
height: 250px;
|
|
|
|
background: white;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2021-12-20 12:36:18 +00:00
|
|
|
</style>
|
|
|
|
<link rel="stylesheet" href="assets/nouislider-15.5.0.css">
|
2021-12-21 13:31:02 +00:00
|
|
|
<link rel="stylesheet" href="core.css">
|
2021-12-08 11:40:45 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2021-12-20 12:36:18 +00:00
|
|
|
<div id='interface'>
|
|
|
|
</div>
|
|
|
|
<script src="assets/nouislider-15.5.0.js"></script>
|
|
|
|
<script src="assets/wNumb-1.2.0.min.js"></script>
|
|
|
|
<script src="annotate.js"></script>
|
2021-12-21 13:31:02 +00:00
|
|
|
<script src="playlist.js"></script>
|
2021-12-20 12:36:18 +00:00
|
|
|
<script type='text/javascript'>
|
2021-12-22 10:52:38 +00:00
|
|
|
let ann;
|
2021-12-21 13:31:02 +00:00
|
|
|
if (location.search) {
|
2021-12-22 10:52:38 +00:00
|
|
|
ann = new Annotator(
|
2021-12-21 13:31:02 +00:00
|
|
|
document.getElementById("interface"),
|
2022-04-29 10:05:48 +00:00
|
|
|
"tags.json",
|
2021-12-21 13:31:02 +00:00
|
|
|
location.search.substring(1)
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
const playlist = new Playlist(document.getElementById("interface"), '/files/');
|
|
|
|
}
|
2022-04-19 11:29:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Hack to disable hardware media keys starting/stopping the audio playback
|
|
|
|
navigator.mediaSession.setActionHandler('play', function() { /* Code excerpted. */ });
|
|
|
|
navigator.mediaSession.setActionHandler('pause', function() { /* Code excerpted. */ });
|
|
|
|
navigator.mediaSession.setActionHandler('seekbackward', function() { /* Code excerpted. */ });
|
|
|
|
navigator.mediaSession.setActionHandler('seekforward', function() { /* Code excerpted. */ });
|
|
|
|
navigator.mediaSession.setActionHandler('previoustrack', function() { /* Code excerpted. */ });
|
|
|
|
navigator.mediaSession.setActionHandler('nexttrack', function() { /* Code excerpted. */ });
|
2021-12-20 12:36:18 +00:00
|
|
|
</script>
|
2021-12-08 11:40:45 +00:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|