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) #2190

Open
bulletbrand opened this issue Sep 6, 2024 · 4 comments

Comments

@bulletbrand
Copy link

bulletbrand commented Sep 6, 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:

<video controls width="300">
  <source src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4" />
  Sorry, your browser doesn't support embedded videos.
</video>

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.

20240906112621974.mp4

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

20240906103635949.mp4

Minimal reproducible example (please use your own Datadog credentials)

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

@ionitron-bot ionitron-bot bot added the triage label Sep 6, 2024
@bulletbrand bulletbrand changed the title Conflict Between Datadog Tracking, CapacitorCookies, and <video> Tag Playback on iOS CapacitorCookies issue: Conflict Between Datadog Tracking, CapacitorCookies, and <video> on iOS Sep 6, 2024
@bulletbrand
Copy link
Author

Similar issue: ionic-team/capacitor#7646

@bulletbrand bulletbrand changed the title CapacitorCookies issue: Conflict Between Datadog Tracking, CapacitorCookies, and <video> on iOS CapacitorCookies issue: Conflict Between Datadog Tracking, CapacitorCookies and <video> on iOS Sep 10, 2024
@bulletbrand bulletbrand changed the title CapacitorCookies issue: Conflict Between Datadog Tracking, CapacitorCookies and <video> on iOS CapacitorCookies issue: Conflict Between Datadog Tracking, CapacitorCookies and <video> on iOS ( Video Pauses Every Time You Try to Play It ) Sep 10, 2024
@bulletbrand bulletbrand changed the title CapacitorCookies issue: Conflict Between Datadog Tracking, CapacitorCookies and <video> on iOS ( Video Pauses Every Time You Try to Play It ) Video Pauses Every Time You Try to Play It on IOS (CapacitorCookies + Datadog Integration Issue) Sep 10, 2024
@alex-mironov
Copy link

Facing the same issue, did you find a solution?

@bulletbrand
Copy link
Author

@alex-mironov

Unfortunately, not yet. If your problem is also caused by the same toolset as mine, you might consider replacing Datadog with Sentry, for example, or disabling the Capacitor cookies plugin. However, I’m not sure if this is a suitable solution here 😅

It seems there is some kind of conflict that needs to be addressed by the tool developers.
If I find a solution, I’ll update here.

@bulletbrand bulletbrand changed the title Video Pauses Every Time You Try to Play It on IOS (CapacitorCookies + Datadog Integration Issue) [BUG] Video Pauses Every Time You Try to Play It on IOS (CapacitorCookies + Datadog Integration Issue) Sep 11, 2024
@ionitron-bot ionitron-bot bot removed the triage label Sep 16, 2024
@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

4 participants