Accessing Media from Templates

You can access the transcoded versions of a video/audio clip from your JSP templates using JSTL as follows (in all the examples video-field-name is the name of the video field in your content type and audio-field-name is the name of the audio field in your content type and index is the index of the transcoded version you want):

  • To access the URI of a transcoded video:

    ${article.fields.video-field-name.value.video[index].uri}
  • To access the video's MIME type:

    ${article.fields.video-field-name.value.video[index]['mime-type']}
  • To access the video's height:

    ${article.fields.video-field-name.value.video[index].height}
  • To access the video's width:

    ${article.fields.video-field-name.value.video[index].width}
  • To access the video's duration:

    ${article.fields.video-field-name.value.duration}
  • To access the video's timeline information:

    ${article.fields.video-field-name.value.timeline.cuepoints}
    ${article.fields.video-field-name.value.timeline.tracks}
    ${article.fields.video-field-name.value.playback}
  • To access the video's key frames:

    ${article.relatedElements.KEYFRAMES.items}

    If a poster frame is selected than the first key frame will be the poster frame.