A simple HTML version of this interview's transcript suitable for printing, saving " +
"as a PDF (by using your browser's \"print to PDF\" functionality) or as a source for text for copy and paste is available." +
"
" +
"Each video in this interview can be downloaded. Depending on your browser, " +
"either open the menu " +
"in the bottom right hand corner of the video or right-click the video to show the video menu, or " +
"select the download icon in the video control bar."
"
" ;
$("#sideBarBot").html(s) ;
let startTape = 1 ;
let startSec = -1 ; // means "at the very start"
// ok - can preload tape and sec from hash
if (hashOnLoad && hashOnLoad.startsWith("#t")) {
let i = hashOnLoad.indexOf(',') ;
if (i > 2) {
try {
startTape = parseInt(hashOnLoad.substring(2, i)) ;
startSec = parseInt(hashOnLoad.substring(i+1)) ;
} catch (err) { }
}
else {
try {
startTape = parseInt(hashOnLoad.substring(2)) ;
} catch (err) { }
}
}
showVideo(startTape, startSec) ;
}
function showAll(showWhat) {
console.log("show all for " + showWhat) ;
switch (showWhat) {
case 'description':
$(".description").html(archive.description) ;
break ;
case 'reflections':
$(".reflections").html(archive.reflections) ;
break ;
}
return false ;
}
function fetchTranscript() {
console.log("fetching transcript") ;
try {
$.getJSON('/archive/transcript/' + archiveId, function(response, textStatus, xhr) {
console.log("got back transcript") ;
transcript = response ;
getImages() ;
formatTranscript() ;
}) ;
}
catch (err) {
alert("fetch transcript failed, err:" + err) ;
console.log("fetch transcript failed " + JSON.stringify(err)) ;
}
}
function getImages() {
const imageSets = ['thenImage', 'otherImage', 'nowImage'] ;
// const imgUrlPrefix = '/archive/' + archiveId + '/image/' ;
const imgUrlPrefix = '/images/' + archiveId + '/' ;
let s = "" ;
let bigImageList = "" ;
let imNum = 0 ;
for (const imageSet of imageSets) {
if (!transcript[imageSet]) continue ;
for (const im of transcript[imageSet]) {
s += '' ;
bigImageList += '' ;
}
}
$("#sideBarTop").append(s) ;
if (bigImageList.length > 0) {
//alert("bigImageList="+bigImageList) ;
$("#bigImages").append(bigImageList) ;
moveImage(0) ;
//$("#bigImages").children("img").first().show() ;
}
}
function showVideo(seq, atTime) {
console.log("showVideo seq=" + seq + " atTime=" + atTime + ", currentVideoSeq="+currentVideoSeq) ;
if (currentVideoSeq == seq) return ; // we know...
closeClipModal() ; // invalidates url
currentVideoSeq = seq ;
$("#tapeSelList").val("" + seq + "");
const tape = archive.tapeIndex[seq] ;
const vidFile = tape.filename ;
let startTime = atTime ;
if (startTime < 0) {
startTime = Math.floor((tape.transcriptfirstcentisecs + tape.transcriptadjustcentisecs) / 100) - 3 ;
if (startTime < 0) startTime = 0 ;
}
const tagName = (videoPlayback) ? "video" : "audio" ;
$("#videoBox").html('<' + tagName + ' width="720" height="576" controls ontimeupdate="timeUpdate()" ' +
'id="videoContainer" class="videoContainer">' +
'' +
'' + tagName + '>') ; // removed autoplay by popular request 30nov20
currentVideoEle = $("#videoContainer")[0] ;
currentTrEleLo = 99999 ;
currentTrEleHi = -1 ;
}
function timeUpdate() {
//console.log("time update " + currentVideoEle.currentTime) ;
let curTime = currentVideoEle.currentTime ;
if ((curTime < currentTrEleHi) && (curTime >=currentTrEleLo)) return ;
// moved away from highlighted transcript element
let lastLastTsEvent = null ;
let lastTsEvent = null ;
let endFound = false ;
if (!transcript || !transcript.tapes) return ; // video started playing, but transcript not finished loading!
for (let i=0;i= 0) && lastTrEleHighlighted) {
let trElePos = lastTrEleHighlighted[0].offsetTop + document.getElementById('t' + currentVideoSeq).offsetTop ;
document.getElementById('transcript').scrollTop = trElePos + 25 ;
}
}
function formatTranscript() {
console.log("format transcript...") ;
let s = "" ;
for (tape of transcript.tapes) {
const tapeIdPref = "t" + tape.tapeSeq ;
const archiveTapeData = archive.tapeIndex[tape.tapeSeq] ;
const adjustSec = (archiveTapeData) ?
((archiveTapeData.transcriptadjustcentisecs == 0) ? 0 : (Math.round(archiveTapeData.transcriptadjustcentisecs / 100)))
: 0 ;
s += "
" +
"
Tape " + tape.tapeSeq + "
" ;
s += "
" ;
let inRow = false ;
for (ev of tape.events) {
if (ev.t == 't') {
const p = ev.c.split(":") ;
ev.sec = Number(p[1]) * 60 + Number(p[2]) ;
let mmss ;
if (adjustSec == 0) { // 99% case
mmss = p[1] + ":" + p[2] ;
}
else {
ev.sec += adjustSec ;
let mm = Math.floor(ev.sec / 60) ;
let ss = ev.sec - mm * 60 ;
mmss = ((mm < 10) ? "0" : "") + mm + ((ss < 10) ? ":0" : ":") + ss ;
}
if (inRow) s += "" ;
s += "
" ; // todo embargoed, nested..
}
}
if (inRow) s+= "
" ;
s += "
" ;
}
$("#transcript").html(s) ;
}
function skip(incr) {
return jumpTo(currentVideoSeq, $("#videoContainer")[0].currentTime + incr) ;
}
function jumpTo(tapeSeq, sec) {
//alert("jump to " + sec) ;
// window.location.hash = "#t" + tapeSeq + "," + sec ;
history.replaceState(undefined, undefined, "#t" + tapeSeq + "," + sec)
if (currentVideoSeq != tapeSeq) showVideo(tapeSeq, sec) ;
else {
$("#videoContainer")[0].currentTime = sec ;
$("#videoContainer")[0].play() ;
}
return false ;
}
function closeModal() {
$("#modal").hide() ;
}
function showImage(n) {
moveImage(n - currentImageIndex) ;
$("#modal").show() ;
}
function moveImage(n) {
let images = $(".bigImage") ;
images.get(currentImageIndex).style.display = 'none' ;
currentImageIndex += n ;
if (currentImageIndex < 0) currentImageIndex = images.length -1 ;
else if (currentImageIndex >= images.length) currentImageIndex = 0 ;
images.get(currentImageIndex).style.display = 'block' ;
$("#bigCaption").html(images.get(currentImageIndex).title) ;
}
function showClipModal() {
const tape = archive.tapeIndex[currentVideoSeq] ;
let src = window.location.href.substring(0, window.location.href.indexOf("/", 10)) + '/videos/' + archive.archive + '/' + tape.filename + "#t=" ;
$("#clipRef").val(src) ;
let curTime = Math.floor(currentVideoEle.currentTime) ;
let min = Math.floor(curTime / 60) ;
let sec = curTime - min * 60 ;
$("#clipStartMin").val(min) ;
$("#clipStartSec").val(sec) ;
$("#clipLength").val(60) ;
clipUpdate() ;
$("#clipModal").show() ;
}
function clipUpdate() {
let min = Number($("#clipStartMin").val()) ;
let sec = Number($("#clipStartSec").val()) ;
let len = Number($("#clipLength").val()) ;
let src = $("#clipRef").val() ;
let i = src.lastIndexOf("#t=") + 3 ;
let startTime = min * 60 + sec ;
src = src.substring(0, i) + startTime + "," + (startTime + len) ;
$("#clipRef").val(src) ;
}
function copyClipUrl() {
let src = $("#clipRef")[0] ;
src.select() ;
src.setSelectionRange(0, 999) ;
document.execCommand("copy") ;
alert("Copied this reference to your clipboard:\n \n" + src.value) ;
}
function closeClipModal() {
$("#clipModal").hide() ;
}
Autosync transcript to media
Search transcripts using CTRL-F on your keyboard or your browser's Find In Page[more]
×
Some text in the Modal..
×
Create a clip: a reference to an interval of this tape
Supply a start time and an interval in seconds to create a reference to an interval of this tape which
you can supply as a direct URL for a browser, or paste into a tool that can play a video snippet from a URL.
Start time (min:sec)
:
Clip length (seconds)
Generated clip URL (manually copy to clipboard for subsequent pasting or click
):