Skip to content

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

Open
@bulletbrand

Description

@bulletbrand

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions