-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial (unstyled controls). Have not yet redone style (and bou…
…nding box) to compensate for new controls.
- Loading branch information
1 parent
5820585
commit 69f5807
Showing
6 changed files
with
328 additions
and
73 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
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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
'use strict'; | ||
|
||
function createVideoAreaHTML(videoInfo, path, type, latitude_input_value, longitude_input_value) { | ||
let start_time_input_value = convertUnixSecsForInput(videoInfo.start_time); | ||
|
||
return ` | ||
<div class='video-container media-area media-area-background'> | ||
<video preload='auto' muted> | ||
<source src='${path}' type='${type}' /> | ||
</video> | ||
<div class='video-controls'> | ||
<div class='vido-controls-row video-controls-progress'> | ||
<progress value='0.0' min='0.0' onclick='videoSeekProgress(this, event)'></progress> | ||
</div> | ||
<div class='vido-controls-row video-controls-seek'> | ||
<button class='skip-far-back' onclick='videoSeekOffset(-5.0)'>↺</button> | ||
<button class='skip-back' onclick='videoSeekOffset(-0.5)'>↶</button> | ||
<button class='play-pause' onclick='videoTogglePlay()'>⏵</button> | ||
<button class='skip-far-back' onclick='videoSeekOffset(0.5)'>↷</button> | ||
<button class='skip-far-back' onclick='videoSeekOffset(5.0)'>↻</button> | ||
</div> | ||
<div class='vido-controls-row video-controls-clip'> | ||
<input type='text' class='clip-start' onchange='setClip(this, true)' /> | ||
<input type='text' class='current-time' onchange='videoSeek(this)' /> | ||
<input type='text' class='clip-end' onchange='setClip(this, false)' /> | ||
</div> | ||
</div> | ||
</div> | ||
<div class='metadata-area'> | ||
<div> | ||
<label for='name'>Name:</label> | ||
<input type='text' name='name' | ||
data-video-id='${videoInfo.id}' | ||
onchange='editVideo(this, "name")' | ||
value='${videoInfo.name}' /> | ||
</div> | ||
<div> | ||
<label for='name'>Video Start Time:</label> | ||
<input type='datetime-local' name='start_time' | ||
data-video-id='${videoInfo.id}' | ||
onchange='editVideo(this, "start_time")' | ||
value='${start_time_input_value}' /> | ||
</div> | ||
<div> | ||
<label for='latitude'>Latitude:</label> | ||
<input type='number' name='latitude' step='0.01' | ||
data-video-id='${videoInfo.id}' | ||
onchange='editVideo(this, "latitude")' | ||
value='${latitude_input_value}' /> | ||
</div> | ||
<div> | ||
<label for='longitude'>Longitude:</label> | ||
<input type='number' name='longitude' step='0.01' | ||
data-video-id='${videoInfo.id}' | ||
onchange='editVideo(this, "longitude")' | ||
value='${longitude_input_value}' /> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
|
||
function createScreenshotHTML(screenshot) { | ||
let time_input_value = convertUnixSecsForInput(screenshot.time); | ||
|
||
return ` | ||
<div class='screenshot media-metadata-container' data-id='${screenshot.id}'> | ||
<div class='image-area media-area' width='${screenshot.width}' height='${screenshot.height}'> | ||
<img class='media-area-background' src='${screenshot.dataURL}'/> | ||
</div> | ||
<div class='metadata-area'> | ||
<div> | ||
<label for='name'>Name:</label> | ||
<input type='text' name='name' | ||
onchange='editScreenshot(this, "${screenshot.id}", "name")' | ||
value='${screenshot.name}' /> | ||
</div> | ||
<div> | ||
<label for='time'>Time:</label> | ||
<input type='datetime-local' name='time' readonly='true' disabled | ||
value='${time_input_value}' /> | ||
</div> | ||
<div> | ||
<span> | ||
<button onclick='flipScreenshot("${screenshot.id}", true)'>Vertical Flip</button> | ||
<button onclick='flipScreenshot("${screenshot.id}", false)'>Horizontal Flip</button> | ||
</span> | ||
</div> | ||
<div> | ||
<button onclick='deleteScreenshot("${screenshot.id}")'>Delete</button> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
} |
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
Oops, something went wrong.