Bug 187193 - Video sometimes flickers when playing to AppleTV
Summary: Video sometimes flickers when playing to AppleTV
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-29 13:39 PDT by Eric Carlson
Modified: 2018-07-05 12:42 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.00 KB, patch)
2018-06-29 13:55 PDT, Eric Carlson
jer.noble: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-sierra (2.32 MB, application/zip)
2018-06-29 15:04 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-sierra (3.16 MB, application/zip)
2018-06-29 15:20 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.09 MB, application/zip)
2018-06-29 17:53 PDT, EWS Watchlist
no flags Details
Patch for landing (14.20 KB, patch)
2018-07-02 11:47 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Fix broken test. (3.22 KB, patch)
2018-07-03 13:33 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff
Fix the broken test (1.49 KB, patch)
2018-07-05 12:02 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2018-06-29 13:39:15 PDT
Video sometimes flickers when playing to AppleTV.
Comment 1 Eric Carlson 2018-06-29 13:41:11 PDT
<rdar://problem/40153865>
Comment 2 Eric Carlson 2018-06-29 13:55:50 PDT
Created attachment 343942 [details]
Patch
Comment 3 Jer Noble 2018-06-29 14:16:29 PDT
Comment on attachment 343942 [details]
Patch

Nit: I'd rather see separate "scheduleUpdateSessionState()" and "updateSessionState()" methods than a single method with a default parameter.
Comment 4 EWS Watchlist 2018-06-29 15:03:59 PDT
Comment on attachment 343942 [details]
Patch

Attachment 343942 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/8387349

New failing tests:
platform/mac/media/audio-session-category-audio-autoplay.html
Comment 5 EWS Watchlist 2018-06-29 15:04:00 PDT
Created attachment 343948 [details]
Archive of layout-test-results from ews101 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 6 EWS Watchlist 2018-06-29 15:20:32 PDT
Comment on attachment 343942 [details]
Patch

Attachment 343942 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/8387320

New failing tests:
platform/mac/media/audio-session-category-audio-autoplay.html
http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html
http/tests/security/webaudio-render-remote-audio-allowed-crossorigin.html
Comment 7 EWS Watchlist 2018-06-29 15:20:34 PDT
Created attachment 343953 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 EWS Watchlist 2018-06-29 17:53:06 PDT
Comment on attachment 343942 [details]
Patch

Attachment 343942 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/8389699

New failing tests:
platform/mac/media/audio-session-category-audio-autoplay.html
Comment 9 EWS Watchlist 2018-06-29 17:53:08 PDT
Created attachment 343987 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 10 Eric Carlson 2018-07-02 11:47:58 PDT
Created attachment 344122 [details]
Patch for landing
Comment 11 WebKit Commit Bot 2018-07-02 14:49:56 PDT
Comment on attachment 344122 [details]
Patch for landing

Clearing flags on attachment: 344122

Committed r233435: <https://trac.webkit.org/changeset/233435>
Comment 12 Dawei Fenton (:realdawei) 2018-07-03 11:02:19 PDT
(In reply to WebKit Commit Bot from comment #11)
> Comment on attachment 344122 [details]
> Patch for landing
> 
> Clearing flags on attachment: 344122
> 
> Committed r233435: <https://trac.webkit.org/changeset/233435>

Seeing crashes in iOS after this revision

Sample Crash Log:
https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/5969/steps/run-api-tests/logs/stdio

 TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
        2018-07-03 10:12:34.215 TestWebKitAPI[54158:225799115] *** Warning: <AVPlayerViewController: 0x7f9ef1804200> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef1804200) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef1804200) exitFullScreenAnimated:completionHandler:]!
        2018-07-03 10:12:34.351 TestWebKitAPI[54158:225799115] *** Warning: <AVPlayerViewController: 0x7f9ef7815000> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef7815000) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef7815000) exitFullScreenAnimated:completionHandler:]!
        2018-07-03 10:12:34.527 TestWebKitAPI[54158:225799115] *** Warning: <AVPlayerViewController: 0x7f9ef7014000> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef7014000) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef7014000) exitFullScreenAnimated:completionHandler:]!
        >>>> frameSizeChanged = 4096
        >>>> frameSizeChanged = 4096
        2018-07-03 10:12:34.713 TestWebKitAPI[54158:225799115] *** Warning: <AVPlayerViewController: 0x7f9ef7029600> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef7029600) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef7029600) exitFullScreenAnimated:completionHandler:]!
        2018-07-03 10:12:34.898 TestWebKitAPI[54158:225799115] *** Warning: <AVPlayerViewController: 0x7f9ef781d600> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7f9ef781d600) exitFullScreenAnimated:completionHandler:]!
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:87
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
        
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:95
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
        
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:103
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
        
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:111
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
Comment 13 Eric Carlson 2018-07-03 11:29:52 PDT
(In reply to David Fenton (:realdawei) from comment #12)
> (In reply to WebKit Commit Bot from comment #11)
> > Comment on attachment 344122 [details]
> > Patch for landing
> > 
> > Clearing flags on attachment: 344122
> > 
> > Committed r233435: <https://trac.webkit.org/changeset/233435>
> 
> Seeing crashes in iOS after this revision
> 
> Sample Crash Log:
> https://build.webkit.org/builders/
> Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/5969/steps/
> run-api-tests/logs/stdio
> 
  This log shows that TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS is failing, but I don't see any indication of a crash.

  I will fix the failing test.
Comment 14 Dawei Fenton (:realdawei) 2018-07-03 11:32:32 PDT
(In reply to Eric Carlson from comment #13)
> (In reply to David Fenton (:realdawei) from comment #12)
> > (In reply to WebKit Commit Bot from comment #11)
> > > Comment on attachment 344122 [details]
> > > Patch for landing
> > > 
> > > Clearing flags on attachment: 344122
> > > 
> > > Committed r233435: <https://trac.webkit.org/changeset/233435>
> > 
> > Seeing crashes in iOS after this revision
> > 
> > Sample Crash Log:
> > https://build.webkit.org/builders/
> > Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/5969/steps/
> > run-api-tests/logs/stdio
> > 
>   This log shows that TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS is
> failing, but I don't see any indication of a crash.
> 
>   I will fix the failing test.

Thanks! sorry about that I mislabeled it as "crash"
Comment 15 Eric Carlson 2018-07-03 13:33:52 PDT
Created attachment 344208 [details]
Fix broken test.
Comment 16 WebKit Commit Bot 2018-07-03 14:02:17 PDT
Comment on attachment 344208 [details]
Fix broken test.

Clearing flags on attachment: 344208

Committed r233478: <https://trac.webkit.org/changeset/233478>
Comment 17 Dawei Fenton (:realdawei) 2018-07-03 17:00:51 PDT
(In reply to WebKit Commit Bot from comment #16)
> Comment on attachment 344208 [details]
> Fix broken test.
> 
> Clearing flags on attachment: 344208
> 
> Committed r233478: <https://trac.webkit.org/changeset/233478>

still failing after this revision:

https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/5980/steps/run-api-tests/logs/stdio


Failed

    TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
        2018-07-03 15:32:45.284 TestWebKitAPI[48251:227456308] *** Warning: <AVPlayerViewController: 0x7ffbe480f600> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe480f600) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe480f600) exitFullScreenAnimated:completionHandler:]!
        2018-07-03 15:32:45.416 TestWebKitAPI[48251:227456308] *** Warning: <AVPlayerViewController: 0x7ffbe880a200> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe880a200) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe880a200) exitFullScreenAnimated:completionHandler:]!
        2018-07-03 15:32:55.766 TestWebKitAPI[48251:227456308] *** Warning: <AVPlayerViewController: 0x7ffbe880ba00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe880ba00) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe880ba00) exitFullScreenAnimated:completionHandler:]!
        >>>> frameSizeChanged = 4096
        >>>> frameSizeChanged = 4096
        2018-07-03 15:33:06.064 TestWebKitAPI[48251:227456308] *** Warning: <AVPlayerViewController: 0x7ffbe8819800> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe8819800) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe8819800) exitFullScreenAnimated:completionHandler:]!
        2018-07-03 15:33:06.377 TestWebKitAPI[48251:227456308] *** Warning: <AVPlayerViewController: 0x7ffbe3826e00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7ffbe3826e00) exitFullScreenAnimated:completionHandler:]!
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:99
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
        
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:108
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
Comment 18 Eric Carlson 2018-07-05 12:02:20 PDT
Created attachment 344348 [details]
Fix the broken test
Comment 19 WebKit Commit Bot 2018-07-05 12:42:35 PDT
Comment on attachment 344348 [details]
Fix the broken test

Clearing flags on attachment: 344348

Committed r233535: <https://trac.webkit.org/changeset/233535>