RESOLVED FIXED 195326
[GStreamer] Let playbin handle redirects for us when appropriate
https://bugs.webkit.org/show_bug.cgi?id=195326
Summary [GStreamer] Let playbin handle redirects for us when appropriate
Philippe Normand
Reported 2019-03-05 05:22:32 PST
Because in MediaPlayerPrivateGStreamer::loadNextLocation() the security-origin check fails.
Attachments
Patch (13.41 KB, patch)
2019-09-30 11:52 PDT, Thibault Saunier
no flags
Patch for landing (13.41 KB, patch)
2019-10-02 07:28 PDT, Thibault Saunier
no flags
Patch for landing (13.43 KB, patch)
2019-10-02 07:34 PDT, Thibault Saunier
no flags
Patch for landing (14.73 KB, patch)
2019-10-02 12:26 PDT, Thibault Saunier
no flags
Philippe Normand
Comment 1 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?
Michael Catanzaro
Comment 2 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).
Thibault Saunier
Comment 3 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.
Philippe Normand
Comment 4 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?
Philippe Normand
Comment 5 2019-09-02 01:25:42 PDT
Trailers play fine in Chromium here.
Thibault Saunier
Comment 6 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 :-)
Thibault Saunier
Comment 7 2019-09-30 11:52:14 PDT
Xabier Rodríguez Calvar
Comment 8 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
Thibault Saunier
Comment 9 2019-10-02 07:28:05 PDT
Created attachment 380017 [details] Patch for landing
WebKit Commit Bot
Comment 10 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
Thibault Saunier
Comment 11 2019-10-02 07:34:34 PDT
Created attachment 380018 [details] Patch for landing
Philippe Normand
Comment 12 2019-10-02 08:15:30 PDT
Comment on attachment 380018 [details] Patch for landing JHBuild bits missing?
Thibault Saunier
Comment 13 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
Thibault Saunier
Comment 14 2019-10-02 12:26:48 PDT
Created attachment 380047 [details] Patch for landing
Philippe Normand
Comment 15 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 :)
WebKit Commit Bot
Comment 16 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>
WebKit Commit Bot
Comment 17 2019-10-02 13:11:17 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 18 2019-10-02 13:12:21 PDT
Note You need to log in before you can comment on or make changes to this bug.