<?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>240336</bug_id>
          
          <creation_ts>2022-05-12 02:32:32 -0700</creation_ts>
          <short_desc>The quality of the video transmitted by WebRTC is very low on iOS Safari 15.4(only Offerer situation)</short_desc>
          <delta_ts>2022-05-18 05:45:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebRTC</component>
          <version>Safari 15</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 15</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=238366</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="yuki uchida">rantarn0326</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>kyle</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1868332</commentid>
    <comment_count>0</comment_count>
    <who name="yuki uchida">rantarn0326</who>
    <bug_when>2022-05-12 02:32:32 -0700</bug_when>
    <thetext># Overview
The quality of the video transmitted by WebRTC is very low on iOS Safari 15.4.
And, changing MediaStreamTrack.enabled eliminate　this problem.


## steps to reproduce
device A: iOS Safari
device B: Any(ChromeM101 on Mac and iPadOS(unknown version) was tested)

1. (device A&amp;B) visit https://yasubaba.github.io/prodSkyWay/room_videoMute/
2. (device A&amp;B) Accept permissions for camera and microphone.
3. (device A&amp;B) join Room and start WebRTC Connection.
4. (device B) received Video is very low quality. (However, the image quality seems to be normal on webrtc internals.)
5. (device A) click `Video Mute/Unmute` 
6.  (device B) received Video is good quality. (However, But on webrtc internals it looks no different than step 4)


The mute procedure is very simple as follows
```
document.getElementById(&apos;js-videoEnabled&apos;).addEventListener(&apos;click&apos;, () =&gt; {
  localStream.getVideoTracks().forEach( track =&gt; {
    track.enabled = !track.enabled;
  });
})
```


## Actual Results
iOS Safari always send low quality video at first, but changing track.enabled is workaround.

## Expected Results
device B receive good quality Video.

## Hardware
iPhone11 iOS15.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868335</commentid>
    <comment_count>1</comment_count>
    <who name="yuki uchida">rantarn0326</who>
    <bug_when>2022-05-12 02:48:59 -0700</bug_when>
    <thetext>(In reply to yuki uchida from comment #0)
&gt; # Overview
&gt; The quality of the video transmitted by WebRTC is very low on iOS Safari
&gt; 15.4.
&gt; And, changing MediaStreamTrack.enabled eliminate　this problem.
&gt; 
&gt; 
&gt; ## steps to reproduce
&gt; device A: iOS Safari
&gt; device B: Any(ChromeM101 on Mac and iPadOS(unknown version) was tested)
&gt; 
&gt; 1. (device A&amp;B) visit https://yasubaba.github.io/prodSkyWay/room_videoMute/
&gt; 2. (device A&amp;B) Accept permissions for camera and microphone.
&gt; 3. (device A&amp;B) join Room and start WebRTC Connection.
&gt; 4. (device B) received Video is very low quality. (However, the image
&gt; quality seems to be normal on webrtc internals.)
&gt; 5. (device A) click `Video Mute/Unmute` 
&gt; 6.  (device B) received Video is good quality. (However, But on webrtc
&gt; internals it looks no different than step 4)
&gt; 
&gt; 
&gt; The mute procedure is very simple as follows
&gt; ```
&gt; document.getElementById(&apos;js-videoEnabled&apos;).addEventListener(&apos;click&apos;, () =&gt; {
&gt;   localStream.getVideoTracks().forEach( track =&gt; {
&gt;     track.enabled = !track.enabled;
&gt;   });
&gt; })
&gt; ```
&gt; 
&gt; 
&gt; ## Actual Results
&gt; iOS Safari always send low quality video at first, but changing
&gt; track.enabled is workaround.
&gt; 
&gt; ## Expected Results
&gt; device B receive good quality Video.
&gt; 
&gt; ## Hardware
&gt; iPhone11 iOS15.4


Postscript.

This problem seems to occur only when iOS Safari is the Offerer. iOS Safari is the Answerer, Chrome receives a clean image from the beginning.


## steps to reproduce
device A: iOS Safari
device B: Any(ChromeM101 on Mac and iPadOS(unknown version) was tested)

1. (device A&amp;B) visit https://yasubaba.github.io/prodSkyWay/room_videoMute/
2. (device A&amp;B) Accept permissions for camera and microphone.
3. (device B) join Room and start WebRTC Connection.
4. (device A) join Room and start WebRTC Connection.(createOffer)
5. (device A&amp;B)  WebRTC Connection start.
6. (device B) received Video is very low quality. (However, the image quality seems to be normal on webrtc-internals.)
7. (device A) click `Video Mute/Unmute` 
8 (device B) received Video is good quality. (However, But on webrtc-internals it looks no different than step 6)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868379</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-05-12 06:40:05 -0700</bug_when>
    <thetext>Can you try on latest iOS 15.5 beta to see whether that fixes your issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868380</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-12 06:41:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/93171146&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868438</commentid>
    <comment_count>4</comment_count>
    <who name="Kyle Foley">kyle</who>
    <bug_when>2022-05-12 09:02:59 -0700</bug_when>
    <thetext>15.5 beta fixes the Safari issue for me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869969</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-05-18 05:45:59 -0700</bug_when>
    <thetext>Marking as configuration changed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>