# Changelog

All notable changes to media9nf are listed here. Versions follow
[Semantic Versioning](https://semver.org/).

## [0.2.0] - 2026-12-04

### Added

- Option `audioasvideo`, for the package and for `\includemedia`. It writes
  audio files as RichMedia `Video` instead of `Sound`, so that Okular plays
  them. Okular ignores `Sound` instances. Off by default; how Adobe viewers
  handle it is untested.
- Embedded media files now carry `/Type /EmbeddedFile`, their MIME type as
  `/Subtype` (for example `video/mp4` or `audio/mpeg`) and their size in
  `/Params`.

### Changed

- With pdfLaTeX, media in formats that are already compressed (MP4, M4V, MOV,
  WebM, 3GP, MP3, M4A, AAC, Ogg) is stored without Flate compression. In the
  test document this made compilation about 9% faster and the PDF 0.7% larger.
  LuaTeX fixes the compression level when the PDF file is opened, and the
  other drivers compress every stream, so they compress the media as before.
- Requires LaTeX 2023-11-01 or later. The package already used `e`-type key
  properties from l3kernel 2023-10-10, so the 2022-06-01 minimum stated before
  was too low. The deprecated `x`-type calls (`\msg_error:nnx`,
  `\iow_shipout_x:Nx` and others) are replaced by their `e`-type forms.

## [0.1.1] - 2026-12-01

### Fixed

- `windowed=<width>x<height>@<position>` given to `\includemedia` wrote the
  position into the window height (for example `360@br`) and ignored it as a
  position. Inside `\includemedia` the `@` is an active character, so the old
  split never matched it.
- `windowed=@<position>` and `windowed` with no value stopped compilation with
  "File ended while scanning use of `\__mna_parse_winsize:w`". A size that is
  not `<width>x<height>` now falls back to the default window size.

### Changed

- FlashVars written by default now contain only `source=<file>`. The Flash
  player skin settings (`skin=SkinOverAllNoFullNoCaption.swf` and others) are
  gone; a native player never used them. `source=` stays because older Okular
  versions use it to find the media file. A `flashvars` option given by the
  user is still passed through unchanged.
- The manual and README now say that Okular plays video but not audio. Okular
  ignores RichMedia instances of type `Sound`, which media9nf writes for
  `.mp3`, `.wav`, `.ogg` and `.aac` files.
- Each media file is hashed once instead of three times, and the regular
  expressions are compiled once when the package loads.
- `playbutton` and `noplaybutton` are still accepted, as no-ops, but no longer
  store a value that nothing read. An unused internal variable is removed.

## [0.1.0] - 2026-12-01

First release.

### Added

- `\includemedia`, `\addmediapath` and `\mediabutton` with the media9 interface.
  Media files are embedded directly in RichMedia annotations of type `Video` or
  `Sound`, without a Flash player.
- Documents that call `VPlayer.swf` or another Flash player embed the media file
  named in `flashvars` (`source=`) or the first non-SWF `addresource` instead.
- Support for pdfLaTeX, LuaLaTeX, XeLaTeX, dvipdfmx, and dvips with Ghostscript.
- Manual (`media9nf-doc.tex`, `media9nf-doc.pdf`), article and beamer examples,
  a generated test clip and poster, and `build.sh` for the CTAN archive.

### Fixed

- The dvips route failed in Ghostscript with a `rangecheck` in `pdfmark`.
  `pdfbase` overwrote the scratch variables that held the RichMediaContent and
  RichMediaSettings references before the annotation was written.

[0.2.0]: https://github.com/gpena/media9nf/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/gpena/media9nf/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/gpena/media9nf/releases/tag/v0.1.0
