Capacitor Version
馃拪 Capacitor Doctor 馃拪
Latest Dependencies:
@capacitor/cli: 8.4.2
@capacitor/core: 8.4.2
@capacitor/android: 8.4.2
@capacitor/ios: 8.4.2
Installed Dependencies:
@capacitor/android: not installed
@capacitor/cli: 8.4.2
@capacitor/core: 8.4.2
@capacitor/ios: 8.4.2
[success] iOS looking great! 馃憣
Other API Details
Platforms Affected
Current Behavior
Video playback is paused (and not resumed) when reading cookie with CapacitorCookies enabled.
Expected Behavior
Video playback should be uninterrupted by cookie retrieval.
Project Reproduction
https://github.com/richard-jfc/capacitor-ios-video-cookie-replication
Additional Information
The use of prompt(JSON.stringify({type: 'CapacitorCookies.get'})) causes video playback to be paused:
|
if (platform === 'ios') { |
|
// Use prompt to synchronously get cookies. |
|
// https://stackoverflow.com/questions/29249132/wkwebview-complex-communication-between-javascript-native-code/49474323#49474323 |
|
|
|
const payload = { |
|
type: 'CapacitorCookies.get', |
|
}; |
|
|
|
const res = prompt(JSON.stringify(payload)); |
This is particularly problematic with a library like mux where the library is repeatedly setting cookie while the video is playing.
This doesn't happen on iOS 16 devices (My iPhone 8).

Capacitor Version
馃拪 Capacitor Doctor 馃拪
Latest Dependencies:
@capacitor/cli: 8.4.2
@capacitor/core: 8.4.2
@capacitor/android: 8.4.2
@capacitor/ios: 8.4.2
Installed Dependencies:
@capacitor/android: not installed
@capacitor/cli: 8.4.2
@capacitor/core: 8.4.2
@capacitor/ios: 8.4.2
[success] iOS looking great! 馃憣
Other API Details
Platforms Affected
Current Behavior
Video playback is paused (and not resumed) when reading cookie with CapacitorCookies enabled.
Expected Behavior
Video playback should be uninterrupted by cookie retrieval.
Project Reproduction
https://github.com/richard-jfc/capacitor-ios-video-cookie-replication
Additional Information
The use of
prompt(JSON.stringify({type: 'CapacitorCookies.get'}))causes video playback to be paused:capacitor/core/native-bridge.ts
Lines 418 to 426 in 1834b97
This is particularly problematic with a library like mux where the library is repeatedly setting cookie while the video is playing.
This doesn't happen on iOS 16 devices (My iPhone 8).