remove video type, so it actually plays again...

This commit is contained in:
Ruben van de Ven 2022-02-18 14:48:31 +01:00
parent 02dc139cf3
commit 3157e677f2
4 changed files with 8 additions and 8 deletions

View file

@ -715,10 +715,10 @@ function startGraph(graph) {
listEl.innerHTML += '<dt class=\'dt-' + getDisplayAttr(attr) + '\' title=\'' + attr + '\'>' + getDisplayAttr(attr) + '</dt><dd class=\'dd-' + getDisplayAttr(attr) + '\'><a href=\'' + nodeAttr[_i] + '\'>' + nodeAttr[_i] + '</a></dd>'; listEl.innerHTML += '<dt class=\'dt-' + getDisplayAttr(attr) + '\' title=\'' + attr + '\'>' + getDisplayAttr(attr) + '</dt><dd class=\'dd-' + getDisplayAttr(attr) + '\'><a href=\'' + nodeAttr[_i] + '\'>' + nodeAttr[_i] + '</a></dd>';
if (nodeDatum['@type'] == 'https://schema.org/VideoObject') { if (nodeDatum['@type'] == 'https://schema.org/VideoObject') {
// console.log(nodeDatum, nodeAttr); // console.log(nodeDatum, nodeAttr);
var videoType = nodeDatum['https://schema.org/encodingFormat'] ? 'type=\'' + nodeDatum['https://schema.org/encodingFormat'] + '\'' : ""; // let videoType = nodeDatum['https://schema.org/encodingFormat'] ? `type='${nodeDatum['https://schema.org/encodingFormat']}'`: "";
var videoType = "";
var poster = nodeDatum['https://schema.org/thumbnailUrl'] ? 'poster=\'' + nodeDatum['https://schema.org/thumbnailUrl'] + '\'' : ""; var poster = nodeDatum['https://schema.org/thumbnailUrl'] ? 'poster=\'' + nodeDatum['https://schema.org/thumbnailUrl'] + '\'' : "";
// TODO: enable outplay and make it work (for some reason it does not...) listEl.innerHTML += '<dd class=\'dd-contentobject\'><video controls ' + poster + ' autoplay><source src=\'' + nodeAttr[_i] + '\' ' + videoType + '></video></dd>';
listEl.innerHTML += '<dd class=\'dd-contentobject\'><video controls ' + poster + '><source src=\'' + nodeAttr[_i] + '\' ' + videoType + '></video></dd>';
} else { } else {
listEl.innerHTML += '<dd class=\'dd-contentobject\'><object data=\'' + nodeAttr[_i] + '\'></object></dd>'; listEl.innerHTML += '<dd class=\'dd-contentobject\'><object data=\'' + nodeAttr[_i] + '\'></object></dd>';
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -598,10 +598,10 @@ var setDetails = function(nodeDatum, nodeIdx) {
listEl.innerHTML += `<dt class='dt-${getDisplayAttr(attr)}' title='${attr}'>${getDisplayAttr(attr)}</dt><dd class='dd-${getDisplayAttr(attr)}'><a href='${nodeAttr[i]}'>${nodeAttr[i]}</a></dd>`; listEl.innerHTML += `<dt class='dt-${getDisplayAttr(attr)}' title='${attr}'>${getDisplayAttr(attr)}</dt><dd class='dd-${getDisplayAttr(attr)}'><a href='${nodeAttr[i]}'>${nodeAttr[i]}</a></dd>`;
if(nodeDatum['@type'] == 'https://schema.org/VideoObject') { if(nodeDatum['@type'] == 'https://schema.org/VideoObject') {
// console.log(nodeDatum, nodeAttr); // console.log(nodeDatum, nodeAttr);
let videoType = nodeDatum['https://schema.org/encodingFormat'] ? `type='${nodeDatum['https://schema.org/encodingFormat']}'`: ""; // let videoType = nodeDatum['https://schema.org/encodingFormat'] ? `type='${nodeDatum['https://schema.org/encodingFormat']}'`: "";
let videoType="";
let poster = nodeDatum['https://schema.org/thumbnailUrl'] ? `poster='${nodeDatum['https://schema.org/thumbnailUrl']}'`: ""; let poster = nodeDatum['https://schema.org/thumbnailUrl'] ? `poster='${nodeDatum['https://schema.org/thumbnailUrl']}'`: "";
// TODO: enable outplay and make it work (for some reason it does not...) listEl.innerHTML += `<dd class='dd-contentobject'><video controls ${poster} autoplay><source src='${nodeAttr[i]}' ${videoType}></video></dd>`;
listEl.innerHTML += `<dd class='dd-contentobject'><video controls ${poster}><source src='${nodeAttr[i]}' ${videoType}></video></dd>`;
} else{ } else{
listEl.innerHTML += `<dd class='dd-contentobject'><object data='${nodeAttr[i]}'></object></dd>`; listEl.innerHTML += `<dd class='dd-contentobject'><object data='${nodeAttr[i]}'></object></dd>`;
} }