Unsafe VLC options are not taken into account when injected by a lua script
Description
The PlaylistManager
works with a list of MediaWrapper
. This object can be initialized with a IMedia
object returned by libvlc. But in this case, only the IMedia
uri is used to generate MediaWrapper.mrl
. The media itself is then discarded and any option set to it is lost.
It leads to issues when the media also has unsafe options set by, for example, a lua script.
Example: youtube.lua tries to add :no-http-forward-cookies
.
As the options for a media cannot be retrieved by design by the VLC API, we cannot make it work without changing the PlaylistManager
logic. We could fix that in two ways:
- The
MediaWrapper
could directly embed theIMedia
instance and keep it while it's needed. It would probably:
- be hard to manage the
IMedia
lifecycle - lead to an increased memory use as the
MediaWrapper
object is used everywhere in the app
- Instead of using a
MediaWrapper
list, we could use aIMedia
list inPlaylistManager
. Probably the easiest and cleanest solution for me. But it's opened to discussion