Bug 195326 - [GStreamer] Let playbin handle redirects for us when appropriate
Summary: [GStreamer] Let playbin handle redirects for us when appropriate
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Thibault Saunier
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-05 05:22 PST by Philippe Normand
Modified: 2019-10-02 13:12 PDT (History)
15 users (show)

See Also:


Attachments
Patch (13.41 KB, patch)
2019-09-30 11:52 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff
Patch for landing (13.41 KB, patch)
2019-10-02 07:28 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff
Patch for landing (13.43 KB, patch)
2019-10-02 07:34 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff
Patch for landing (14.73 KB, patch)
2019-10-02 12:26 PDT, Thibault Saunier
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2019-03-05 05:22:32 PST
Because in MediaPlayerPrivateGStreamer::loadNextLocation() the security-origin check fails.
Comment 1 Philippe Normand 2019-03-05 05:25:09 PST
Original url example: https://movietrailers.apple.com/movies/wb/shazam/shazam-trailer-2_480p.mov
Redirected url example: http://movietrailers.apple.com/movies/wb/shazam/shazam-trailer-2_h480p.mov

I suppose the origin check fails because the new url doesn't use https?
Comment 2 Michael Catanzaro 2019-03-06 18:03:15 PST
Yup, the different protocol means it's a totally different security origin with no permission to access the other. Security origin is <protocol, host, port> (except in Internet Explorer, where port is not considered).
Comment 3 Thibault Saunier 2019-08-28 09:21:34 PDT
To me the issue is in the REDIRECT is incorrect, it should point to the `https` variant.

chrome or firefox are not able to play that stream either, for some reason Safari is.

I would just close the bug tbh.
Comment 4 Philippe Normand 2019-08-28 09:34:05 PDT
Hi Eric,

Can you shed some light here, maybe?
Is this a server-side issue? Why is Safari not affected?
Comment 5 Philippe Normand 2019-09-02 01:25:42 PDT
Trailers play fine in Chromium here.
Comment 6 Thibault Saunier 2019-09-04 14:15:42 PDT
I proposed patches in GStreamer to allow a better handling of redirection in case of quicktime streams with no tracks so playbin can support it for us, see:

- https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/419/diffs
- https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/340

This makes thing simpler and cleaner for us, let's see how it goes there :-)
Comment 7 Thibault Saunier 2019-09-30 11:52:14 PDT
Created attachment 379836 [details]
Patch
Comment 8 Xabier Rodríguez Calvar 2019-09-30 23:28:30 PDT
Comment on attachment 379836 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379836&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2170
> +        g_object_get(m_pipeline.get(), "current-uri", &playbinUrlStr.outPtr(), NULL);

nullptr
Comment 9 Thibault Saunier 2019-10-02 07:28:05 PDT
Created attachment 380017 [details]
Patch for landing
Comment 10 WebKit Commit Bot 2019-10-02 07:29:42 PDT
Comment on attachment 380017 [details]
Patch for landing

Rejecting attachment 380017 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 380017, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: https://webkit-queues.webkit.org/results/13087437
Comment 11 Thibault Saunier 2019-10-02 07:34:34 PDT
Created attachment 380018 [details]
Patch for landing
Comment 12 Philippe Normand 2019-10-02 08:15:30 PDT
Comment on attachment 380018 [details]
Patch for landing

JHBuild bits missing?
Comment 13 Thibault Saunier 2019-10-02 08:21:16 PDT
(In reply to Philippe Normand from comment #12)
> Comment on attachment 380018 [details]
> Patch for landing
> 
> JHBuild bits missing?

Oops, indeed, fixing that
Comment 14 Thibault Saunier 2019-10-02 12:26:48 PDT
Created attachment 380047 [details]
Patch for landing
Comment 15 Philippe Normand 2019-10-02 13:10:18 PDT
Comment on attachment 380047 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=380047&action=review

> Tools/gstreamer/jhbuild.modules:85
> +      <patch file="good-0001-qtdemux-Specify-REDIRECT-information-in-error-messag.patch" strip="1"/> <!-- Merged upstream, should be shipped in 1.16.1 -->

1.16.2 :)
Comment 16 WebKit Commit Bot 2019-10-02 13:11:15 PDT
Comment on attachment 380047 [details]
Patch for landing

Clearing flags on attachment: 380047

Committed r250624: <https://trac.webkit.org/changeset/250624>
Comment 17 WebKit Commit Bot 2019-10-02 13:11:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 18 Radar WebKit Bug Importer 2019-10-02 13:12:21 PDT
<rdar://problem/55921354>