Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Video Pauses Every Time You Try to Play It on IOS (CapacitorCookies + Datadog Integration Issue) #29248

Open
bulletbrand opened this issue Sep 11, 2024 · 1 comment

Comments

@bulletbrand
Copy link

bulletbrand commented Sep 11, 2024

Description:

When using Datadog's automatic tracking with CapacitorCookies: { enabled: true } in a Capacitor app on iOS, video playback for video tags is interrupted or fails to function properly. This issue affects all video elements and any libraries that use them under the hood.

Through testing, it was identified that Datadog’s automatic tracking of user interactions (e.g., route changes, button clicks) conflicts with video playback on iOS. Disabling CapacitorCookies or setting trackViewsManually in Datadog can resolve the issue temporarily, but the underlying cause seems related to how Capacitor handles cookies in combination with Datadog’s tracking.

Environment:

IOS device/emulator 17.5 ( any version bug is reproducable )

Plugin

CapacitorCookies with capacitor 6.0.0( any version bug is reproducable )

Step to reproduce

1)Initialize a Capacitor iOS app with the following configuration:

datadogRum.init({
trackViewsManually: false,
...
});
2)Enable CapacitorCookies in capacitor.config.json:

{
"CapacitorCookies": {
"enabled": true
}
}
3)Add a video tag to any component or page:

4)Run the app on an iOS device/emulator and attempt to play the video.

Expected Behavior:
The video should play without any interruptions or issues.

365092608-35e85295-2ec7-4676-96f2-7cc4e3b24d48.mp4

Actual Behavior:
The video fails to play or stops unexpectedly.

365077569-1300d3d9-e8d8-4e0d-907f-5cc2b7d66398.mp4

Minimal reproducible example (please use your own Datadog credentials)

https://github.com/bulletbrand/safe-area-demo-repo


I’ve already created a similar issue on the Capacitor repo, but if you have any ideas or the opportunity to take a look, I would greatly appreciate it. ionic-team/capacitor-plugins#2190

There seems to be a problem with integrating these tools

@Abildtoft
Copy link

We are also seeing the issue, but do not have Datadog, disabling CapacitorCookies solves the issue, but as we depend on it, that is not a viable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants