Summary: | Autoplaying of renditions (audio/video) | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Michal Vlasák <lahcim8> |
Component: | PDF backend | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | me, nate, oliver.sander |
Priority: | NOR | ||
Version: | 21.04.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/okular/commit/a33e499b4031a7a9f383017c92a77c1eb95ea782 | Version Fixed In: | |
Attachments: | Example file, mentioned in the bug description. |
Description
Michal Vlasák
2021-05-06 21:44:21 UTC
> I think that the current handling of "AutoPlay" is wrong for Renditions.
Did you check what Acrobat does? Okular would usually strive to do the same.
(In reply to Oliver Sander from comment #1) > > I think that the current handling of "AutoPlay" is wrong for Renditions. > > Did you check what Acrobat does? Okular would usually strive to do the same. TL;DR: Yes it correctly handles `/A` and Rendition actions. In Acrobat `/A` works almost as expected. When the annotation is activated (e.g. using Rendition action on page open or "on click" action) and `/A` is true (default) everything starts playing normally. If `/A` is false however only black frame is displayed (here first frame of the video would be expected). In this activated, but not playing, state it is possible to play the video using controls (and maybe JavaScript, but I don't know the API available for Renditions well). I don't know whether it is possible to achieve the behaviour expected by `/A` in Okular, but I think it would be fine to just assume `/A` to be true. Because "true" essentially doesn't mean "starting playing automatically" but "don't pause instead of playing". "Start playing" should be left to the rendition actions, which may for example be used as "Additional Actions" on the Screen annotation to start the playback on "page open" or other event. I can also confirm that Acrobat does treat the /A flag as “autoplay when activated” and not “activate automatically” as Okular does. The flag is poorly named, but the spec says (quote is from 1.7, table 9.15):
> A boolean (Optional) If true, the media should automatically play when activated. If false, the media should be initially paused when activated (for example, the first frame is displayed). Relevant only for media that may be paused. Default value: true.
Git commit a33e499b4031a7a9f383017c92a77c1eb95ea782 by Albert Astals Cid, on behalf of Cimbali. Committed on 15/02/2023 at 23:32. Pushed by aacid into branch 'master'. Fix wrong interpretation of autoplay flag M +12 -0 core/movie.cpp M +10 -0 core/movie.h M +8 -1 generators/poppler/generator_pdf.cpp M +3 -0 part/videowidget.cpp https://invent.kde.org/graphics/okular/commit/a33e499b4031a7a9f383017c92a77c1eb95ea782 |