p:media组件在FireFox中不起作用,但在Chrome和Opera中起作用。 我正在尝试显示PDF文档,但是在FireFox中什么也没有显示。 尽管本教程中的组件已为我显示:https://www.primefaces.org/showcase/ui/multimedia/media.xhtml
function myFunction(fileName,mylist) {
var TEMPLATE_ID = '1J-SAMPLE_ID_M62jskUWs';
var documentId = DriveApp.getFileById(TEMPLATE_ID).makeCopy().getId();
var drivedoc = DriveApp.getFileById(documentId);
drivedoc.setName(fileName);
var doc = DocumentApp.openById(documentId);
var body = doc.getBody();
var x;
var end = mylist.length;
for (x=1; x<=end; x+=1){
if (mylist[x-1].indexOf('http') > -1) {
var resp = UrlFetchApp.fetch(mylist[x-1]);
body.replaceText('<' + x + '>', body.appendImage(resp.getBlob()));
} else {
body.replaceText('<' + x + '>', mylist[x-1]);
}
}
drivedoc.setSharing(DriveApp.Access.ANYONE_WITH_LINK, DriveApp.Permission.EDIT);
return "https://docs.google.com/document/d/" + documentId + "/export?format=pdf";
}