55import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .getIosUserAgent ;
66import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isAndroidStreamingUrl ;
77import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isIosStreamingUrl ;
8- import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isTvHtml5SimplyEmbeddedPlayerStreamingUrl ;
8+ import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isTvHtml5StreamingUrl ;
99import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isWebStreamingUrl ;
10+ import static org .schabi .newpipe .extractor .services .youtube .YoutubeParsingHelper .isWebEmbeddedPlayerStreamingUrl ;
1011import static org .schabi .newpipe .extractor .utils .Utils .isNullOrEmpty ;
1112
1213import org .schabi .newpipe .extractor .MediaFormat ;
@@ -582,8 +583,8 @@ public static void generateSegmentTimelineElement(@Nonnull final Document doc)
582583 * This method fetches, for OTF streams and for post-live-DVR streams:
583584 * <ul>
584585 * <li>the base URL of the stream, to which are appended {@link #SQ_0} and
585- * {@link #RN_0} parameters, with a {@code GET } request for streaming URLs from HTML5
586- * clients and a {@code POST} request for the ones from the {@code ANDROID} and the
586+ * {@link #RN_0} parameters, with a {@code POS } request for streaming URLs from
587+ * {@code WEB}, {@code TVHTML5}, {@code WEB_EMBEDDED_PLAYER}, {@code ANDROID} and
587588 * {@code IOS} clients;</li>
588589 * <li>for streaming URLs from HTML5 clients, the {@link #ALR_YES} param is also added.
589590 * </li>
@@ -602,7 +603,8 @@ public static Response getInitializationResponse(@Nonnull String baseStreamingUr
602603 final DeliveryType deliveryType )
603604 throws CreationException {
604605 final boolean isHtml5StreamingUrl = isWebStreamingUrl (baseStreamingUrl )
605- || isTvHtml5SimplyEmbeddedPlayerStreamingUrl (baseStreamingUrl );
606+ || isTvHtml5StreamingUrl (baseStreamingUrl )
607+ || isWebEmbeddedPlayerStreamingUrl (baseStreamingUrl );
606608 final boolean isAndroidStreamingUrl = isAndroidStreamingUrl (baseStreamingUrl );
607609 final boolean isIosStreamingUrl = isIosStreamingUrl (baseStreamingUrl );
608610 if (isHtml5StreamingUrl ) {
@@ -748,7 +750,8 @@ private static Response getStreamingWebUrlWithoutRedirects(
748750 int redirectsCount = 0 ;
749751 while (!responseMimeType .equals (responseMimeTypeExpected )
750752 && redirectsCount < MAXIMUM_REDIRECT_COUNT ) {
751- final Response response = downloader .get (streamingUrl , headers );
753+ final byte [] html5Body = new byte [] {0x78 , 0 };
754+ final Response response = downloader .post (streamingUrl , headers , html5Body );
752755
753756 final int responseCode = response .responseCode ();
754757 if (responseCode != 200 ) {
0 commit comments