简体   繁体   中英

AEM6.5 cannot user path for selecting video in video component

We would like the editors to be able to use the path selector as well as drag and drop when they select an MP4 file for the video component. At the moment only the drag and drop for video file works. That means, only when you drag and drop an MP4 file from Assets will this be taken into account for the video component. For the image component one can drag an drop an image from Assets or select it using the path.

I am attaching the video component _cq_diaglog/.content.xml

<file jcr:primaryType="nt:unstructured"
      sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
      name="./videoFile"
      fieldLabel="Video"
      fileNameParameter="./videoFileName"
      fileReferenceParameter="./videoFileReference"
      title="MP4-Video"
      mimeTypes="[video/mp4]"
      uploadUrl="${suffix.path}"
      allowUpload="{Boolean}${not empty cqDesign.allowUpload ? cqDesign.allowUpload : false}"
      autoStart="{Boolean}false"
      multiple="{Boolean}false"
      required="{Boolean}true"
      useHTML5="{Boolean}true"
      class="cq-droptarget"/>

as well as the video component _cq_editConfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
          jcr:primaryType="cq:EditConfig">
    <cq:dropTargets jcr:primaryType="cq:DropTargetConfig">
        <video
                jcr:primaryType="nt:unstructured"
                accept="[video/mp4]"
                groups="[media]"
                propertyName="./videoFileReference"/>
    </cq:dropTargets>
</jcr:root>
 

I am also attaching two screenhost pictures from the editor where we would like the editors to be able to select a video by browsing the path: drop asset here pick asset here

It turned out the Videos in DAM did not have thumbnails under Renditions. After adding thumbnail renditions for a video one can add it using the Path selector. Everything was ok with code and configuration just content was missing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM