summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/lpdf-wid.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-07-27 19:52:30 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-07-27 19:52:30 +0200
commitdf12f144a2cb09cec29a95df26bdfc5ccad58aff (patch)
treef25cb74e040f21e898e270c1299899b51b34bba7 /tex/context/base/mkxl/lpdf-wid.lmt
parentc73351bc5e590d5a7ebd2b0f13f895a447d25794 (diff)
downloadcontext-df12f144a2cb09cec29a95df26bdfc5ccad58aff.tar.gz
2021-07-27 19:27:00
Diffstat (limited to 'tex/context/base/mkxl/lpdf-wid.lmt')
-rw-r--r--tex/context/base/mkxl/lpdf-wid.lmt18
1 files changed, 11 insertions, 7 deletions
diff --git a/tex/context/base/mkxl/lpdf-wid.lmt b/tex/context/base/mkxl/lpdf-wid.lmt
index 1bccd9fc9..a75053c94 100644
--- a/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/tex/context/base/mkxl/lpdf-wid.lmt
@@ -23,6 +23,9 @@ if not modules then modules = { } end modules ['lpdf-wid'] = {
-- the other fragile bit. And, now that adobe quits flash in 2020 we're without any
-- video anyway. Also, it won't play on all platforms and devices so let's wait for
-- html5 media in pdf then.
+--
+-- See mail by Michal Vlasák to the mailing list that discusses current support in
+-- viewers and also mentions a few fixes wrt embedding media.
local tonumber, next = tonumber, next
local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower
@@ -689,18 +692,19 @@ local function insertrendering(specification)
-- B = start,
-- }
-- }
- -- local parameters = pdfdictionary {
- -- Type = pdfconstant(MediaPermissions),
- -- TF = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS
- -- }
+ local parameters = pdfdictionary {
+ Type = pdfconstant(MediaPermissions),
+ TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp
+ }
local descriptor = pdfdictionary {
Type = pdfconstant("Filespec"),
F = filename,
}
if isurl then
descriptor.FS = pdfconstant("URL")
+ descriptor = pdfreference(pdfflushobject(descriptor))
elseif option[v_embed] then
- descriptor.EF = codeinjections.embedfile {
+ descriptor = codeinjections.embedfile {
file = filename,
mimetype = mimetype, -- yes or no
compress = false,
@@ -712,8 +716,8 @@ local function insertrendering(specification)
N = label,
CT = mimetype,
Alt = pdfarray { "", "file not found" }, -- language id + message
- D = pdfreference(pdfflushobject(descriptor)),
- -- P = pdfreference(pdfflushobject(parameters)),
+ D = descriptor,
+ P = pdfreference(pdfflushobject(parameters)),
}
local rendition = pdfdictionary {
Type = pdfconstant("Rendition"),