Bug 198658 - AirPlay fails when playing a base64 video
Summary: AirPlay fails when playing a base64 video
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-07 05:49 PDT by Johan
Modified: 2019-06-07 13:33 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan 2019-06-07 05:49:40 PDT
Environment: Safari Mobile 12.1 (iOS 12.2), Apple TV A1625 tvOS 12.3

In our product, we are implementing the scenario below to detect if video playback is allowed (in autoplay, or after a user interaction)
(We need to know if the video can be played to do a list of operations as fetching advertising information, before playing the actual video)

1. load an inlined, short base64 video with sound in the <video> tag
2. trigger a play() instruction on the <video> tag
3a. if the play() Promise is resolved, load and play the actual video
3b. if the play() Promise is rejected, show a default UI and wait for a user interaction

This scenario does not seem to work properly in Safari Mobile when the video tag has been attached to AirPlay.

In that case, the play() Promise that is returned when playing the base64 video never resolves or rejects, leaving both Safari Mobile and the AppleTV in a broken state.
Note: the issue can't be reproduced if the video tag has been muted first.

The issue can be reproduced here: https://jsfiddle.net/g5e1jqfv/ (explanation about the test scenario is included in the page)
Comment 1 Radar WebKit Bug Importer 2019-06-07 13:33:14 PDT
<rdar://problem/51533372>