Description
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.