Open Bug 1899937 Opened 10 months ago Updated 6 days ago

plus.nhk.jp - Video playback is not supported

Categories

(Web Compatibility :: Site Reports, defect, P1)

Tracking

(Webcompat Score:4, Webcompat Priority:P1)

Webcompat Score 4
Webcompat Priority P1

People

(Reporter: ksenia, Unassigned)

References

(Depends on 1 open bug, )

Details

(4 keywords, Whiteboard: [webcompat-source:web-bugs])

User Story

platform:windows,mac,linux,android
impact:unsupported-feature
configuration:general
affects:all
branch:release
user-impact-score:800

Environment:
Operating system: Windows 10
Originally reported Firefox version: Firefox 101.0
Last reproduced with the following UA: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Platforms reproduced on: windows,mac,linux,android

Steps to reproduce:
The web site does not support Firefox any more from 23-May-2022.

なお、ブラウザ「Firefox」での利用は従来から推奨しておりませんが、5月23日以降に実施予定のアップデートによって、動画が完全に再生できなくなります。推奨環境(https://plus.nhk.jp/info/faq/#C004-0002)をご確認のうえ、Microsoft Edge・Google Chrome・Safariをご利用ください。

From: https://provision-plus.nhk.jp/operation/message.html?id=0000001068

Actual Behavior:
The web site will not support Firefox any more from 23-May-2022

Created from https://github.com/webcompat/web-bugs/issues/103463

Summary: provision-plus.nhk.jp - Firefox is unsupported browser → plus.nhk.jp - Video playback is not supported

From https://github.com/webcompat/web-bugs/issues/103463#issuecomment-1167338453:

From today, NHK+ seems not to support Firefox. Even if changing to Chrome UA, video streaming isn't started. Although they seems to use MPEG-DASH, Firefox doesn't recognize this stream even if it is downloading *.m4s.

Severity: S3 → S2
User Story: (updated)
User Story: (updated)

I managed to start live streaming of NHK+ on Firefox.
The problem other than useragent (more specifically, the navigator.userAgent javascript object) was requestPictureInPicture method being undefined for HTMLVideoElement. After putting a nop function, ex: HTMLVideoElement.prototype.requestPictureInPicture = ()=>{}, the live stream started successfully.
I don't know why NHK descided to see requestPictureInPicture, but the encoding may not be a problem.

Also, this bug should not depend on https://bugzilla.mozilla.org/show_bug.cgi?id=1886129 but should depend on https://bugzilla.mozilla.org/show_bug.cgi?id=1886128, because the browser unsupported dialog cannot be bypassed with normal user interaction.

Tested on Firefox Developer Edition 128.0b9 (64-bit), Windows 10.

Thank you for the investigation steve_0628. I'll look into adding a sitepatch for the UA override and requestPictureInPicture.

NHK seems to change Firefox detection like

function Ne() {
        return !xe() &&
        !function () {
          if (void 0 === document.pictureInPictureElement) return !1;
          if (void 0 === PictureInPictureWindow) return !1;
          if (void 0 === PictureInPictureEvent) return !1;
          try {
            HTMLVideoElement.prototype.requestPictureInPicture().catch((function () {
            }))
          } catch (e) {
            return !1
          }
          return !0
        }()
      }
Webcompat Priority: --- → P3
User Story: (updated)
Webcompat Priority: P3 → P1
Webcompat Score: --- → 8
Priority: P2 → P1
Webcompat Score: 8 → 4

It seems that they have again changed their Firefox detection, and we now need to define more picture-in-picture stuff: PictureInPictureWindow, PictureInPictureEvent, pictureInPictureElement, and requestPictureInPicture. I have a patch in the works.

I managed to create a UserScript that enables playback on Firefox.

HTMLVideoElement.prototype.requestPictureInPicture = ()=>{
    return {catch: ()=>{}}; // for some reason NHK+ uses catch to detect Firefox
}
document.__defineGetter__('pictureInPictureElement', ()=>{return false}); // falsy, non-undefined value
window.PictureInPictureWindow = "window"; // needs to be defined
window.PictureInPictureEvent = "event"; // needs to be defined

To test this script, you will need to disable built-in compat feature with about:compat. I tested with Tampermonkey installed from official addon store.

You need to log in before you can comment on or make changes to this bug.