<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>300990</bug_id>
          
          <creation_ts>2025-10-17 09:34:40 -0700</creation_ts>
          <short_desc>REGRESSION (iOS 26): Video playback fails on PWA after reopening stuck on first frame</short_desc>
          <delta_ts>2025-12-26 11:13:27 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Safari 26</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 26</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>295518</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=295518</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=300115</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>jb.thery</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>asif</cc>
    
    <cc>cmorison</cc>
    
    <cc>igor.alemasow</cc>
    
    <cc>jean-yves.avenard</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
    
    <cc>ziyak97</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2152092</commentid>
    <comment_count>0</comment_count>
    <who name="">jb.thery</who>
    <bug_when>2025-10-17 09:34:40 -0700</bug_when>
    <thetext>I have observed this issue on iOS PWAs:
	1.	Add the web app (e.g. TikTok or my own) to the Home Screen (“Add to Home Screen”).
	2.	Open the PWA for the first time: video playback works correctly.
	3.	Close the PWA / background it. Then reopen it from Home Screen the video does not restart, it remains stuck on the first frame (or poster image), and does not respond to play.

In the case of TikTok, I inspected their video element inside the PWA; here is an example:

&lt;video
  class=&quot;&quot;
  autoplay=&quot;&quot;
  playsinline=&quot;&quot;
  x5-playsinline=&quot;true&quot;
  webkit-playsinline=&quot;true&quot;
  mediatype=&quot;video&quot;
  data-index=&quot;-1&quot;
  data-xgplayerid=&quot;…&quot;
  poster=&quot;&quot;
  preload=&quot;auto&quot;
  src=&quot;blob:https://www.tiktok.com/332a067a-652c-4772-a27b-22b8c9abc094&quot;
  style=&quot;width:100%; height:100%; position:absolute; top:0; left:0; z-index:3; object-fit:cover;&quot;&gt;
&lt;/video&gt;

Notably, TikTok uses a blob URL as the video source via JavaScript / buffer, which may help avoid this PWA playback reset issue.

Reproduction example (my component from my app workoutgen):

&lt;video
  ref={videoRef}
  key={video}
  className=&quot;h-screen w-screen sm:w-full bg-black object-cover&quot;
  style={{ backgroundColor: &quot;#000000&quot; }}
  src={video}
  poster={image}
  preload=&quot;metadata&quot;
  crossOrigin=&quot;anonymous&quot;
  muted
  loop
  playsInline
  autoPlay
  disablePictureInPicture
  disableRemotePlayback
  tabIndex={-1}
  draggable={false}
  aria-label={`Video for ${name} exercise`}
  x-webkit-airplay=&quot;deny&quot;
  webkit-playsinline=&quot;true&quot;
/&gt;

This works fine at first, but after closing and reopening the PWA on iOS, the video will not resume.


Additional context and observations:
	•	The bug appears specific to iOS PWAs: after resuming, video playback fails.
	•	Some users mention that clearing Safari’s cache “resets” the playback, hinting at internal caching or state issues.
	•	WebKit bug reports exist about media playback issues in PWAs when an app returns to the foreground (for example, bugs involving getUserMedia() streams).
	•	The difference in using a blob-based video URL (rather than a direct HTTP URL) suggests TikTok may bypass the bug by injecting video via JavaScript/MediaSource.


Impact:
	•	Users on iOS may find the PWA unusable after the first session if they cannot watch the video again.
	•	This issue degrades the user experience significantly on iOS devices for apps relying on video content.


Suggested investigation / mitigation ideas:
	•	Investigate using blob URLs (e.g. URL.createObjectURL) or MediaSource API to feed the video buffer instead of direct HTTP src.
	•	Add event listeners for visibilitychange or PWA resume, then call video.load() + video.play() or reassign the source.
	•	Force a “reset” of the video source on resume (e.g. set src = &quot;&quot;, then reassign, then load() + play()).
	•	Test across multiple iOS 26 versions (e.g. 26.0, 26.0.1, 26.0.2) to confirm the issue is persistent.
	•	Provide a minimal reproduction page (bare HTML + video) to WebKit / Apple for debugging.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152251</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-10-17 17:04:55 -0700</bug_when>
    <thetext>Thank you for the report! Just to clarify, is this is a new issue in iOS 26 that definitely didn&apos;t happen in earlier versions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152290</commentid>
    <comment_count>2</comment_count>
    <who name="">jb.thery</who>
    <bug_when>2025-10-17 20:47:35 -0700</bug_when>
    <thetext>Hello, Yes, this definitely seems to be a new issue introduced in iOS 26, it didn’t happen in earlier versions.

I’ve confirmed the behavior using both my own web app and the TikTok PWA (add to home screen):
	•	Videos work fine the first time after adding to the home screen.
	•	But after closing and reopening, playback stops.

If it helps, I can share details about my app implementation (React + &lt;video&gt; element) or provide a test URL to reproduce the issue.
Happy to help if you need more data or logs.

Others users mention this issue on internet :

https://discussions.apple.com/thread/256137345?utm_source=chatgpt.com&amp;sortBy=rank</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152291</commentid>
    <comment_count>3</comment_count>
    <who name="">jb.thery</who>
    <bug_when>2025-10-17 20:54:54 -0700</bug_when>
    <thetext>Steps to reproduce the bug
	1.	On an iOS 26 device, open the web version of TikTok in Safari.
	2.	Use “Add to Home Screen” to install it as a PWA.
	3.	Launch the app via its Home Screen icon, and play a video. It works as expected.
	4.	Close (force-quit) the app.
	5.	Reopen it via the Home Screen icon and navigate to the same video. The video is now stuck / blocked and no longer plays.
	6.	I reproduced the same behavior in my own web app (PWA) workoutgen.app as well.

Let me know if you want me to include media logs, console output, or test files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152467</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-10-19 15:12:04 -0700</bug_when>
    <thetext>Thank you for the confirmation! This sounds the same as a couple older bugs that I related, but there is some subtle history which I&apos;ll leave to media experts to untangle. And there are also reports of MediaRecorder not working in Home Screen web apps as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154049</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-10-24 09:35:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/163347322&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154453</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-10-27 08:56:00 -0700</bug_when>
    <thetext>*** Bug 301484 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154456</commentid>
    <comment_count>7</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2025-10-27 08:58:39 -0700</bug_when>
    <thetext>*** Bug 300115 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167662</commentid>
    <comment_count>8</comment_count>
    <who name="b0xed">asif</who>
    <bug_when>2025-12-21 07:33:40 -0800</bug_when>
    <thetext>I’ve found that when I workaround bug #272325 by forcing a reload to refresh cookies, the video playback in our PWA stops working – the symptoms match bug #300990.  Conversely, if I allow the stale cookies to persist, videos play normally.  This suggests that the cookie reset bug and the video freeze bug might share a root cause.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168267</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-12-26 11:13:27 -0800</bug_when>
    <thetext>This has been determined to be the same as bug 295518, which is fixed in iOS 26.2. Please let us know if you are still experiencing this issue.

*** This bug has been marked as a duplicate of bug 295518 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>