fix: skip addition of src
attribute for HLS videos
#1446
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Follow on from problem mentioned in PostHog/posthog#25174 (comment)
When testing locally by adding the
hls-src
attribute to an exported recording I hadn't considered that actual data would add asrc
attribute to the video, which is picked up as a mutation.This local URL (something akin to
blob:http://localhost:3000/4200b9dc-71b1-42f9-a753-486f93222f0a
) then overrides thesrc
that we need to write during the plugin playback.Rather than trying to detect the insertion of the src attribute using the
handler
and skip it (not sure this is possible with plugins) we should be able to ignoresrc
attributes on videos that point to local files e.g. HLS videos