public String resolveSource(FacesContext context, UIMedia media) throws IOException {
        try {
            return DynamicContentSrcBuilder.build(context, media, media.getValueExpression(PropertyKeys.value.name()),
                    new Lazy<>(() -> getValue()), media.isCache(), true);
        }
        catch (Exception ex) {
            throw new IOException(ex);
        }
    }
Base class for HTML5 audio and video components.
primefaces/src/main/java/org/primefaces/component/api/UIMedia.java