videos on rainews.it not visible

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
damjang
Moon lover
Moon lover
Posts: 99
Joined: 2012-01-14, 11:22

videos on rainews.it not visible

Unread post by damjang » 2023-10-31, 20:55

Can someone check why the videos on this page https://www.rainews.it/tgr/fvg are not visible? Is it a DRM problem or something else? Thank you!

damjang
Moon lover
Moon lover
Posts: 99
Joined: 2012-01-14, 11:22

Re: videos on rainews.it not visible

Unread post by damjang » 2023-11-01, 16:46

In PM (32.5.0 x64 on Win11 x64) error console I see this error:

Code: Select all

ERROR: TypeError: Illegal constructor.       rai-footer.js:1:40976
WARNING: Sinhron XMLHttpRequest na glavni niti je zastarel zaradi škodljivih vplivov na uporabniško izkušnjo. Za več informacij si oglejte http://xhr.spec.whatwg.org/ cookieBanner.js:2:93737
In the rai-footer.js:1:40976 I see this:

Code: Select all

{const t=new CSSStyleSheet;await this.updateComplete;const e=document.querySelector("rai-footer");const r=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio>0&&(t.replaceSync(Ft.a),document.adoptedStyleSheets=[t],r.disconnect())})}

User avatar
adoxa
Fanatic
Fanatic
Posts: 170
Joined: 2019-03-16, 13:26

Re: videos on rainews.it not visible

Unread post by adoxa » 2023-11-02, 07:56

CSSStyleSheet with a constructor is not supported by PM, but that doesn't affect the video. The problem is because PromiseRejectionEvent is also not supported, which causes an apparently incomplete polyfill (lacking allSettled) to be used. Here's a userScript to work around it.

Code: Select all

// ==UserScript==
// @name        PromiseRejectionEvent dummy
// @namespace   adoxa
// @include     https://www.rainews.it/tgr/fvg/*
// @version     1
// @grant       none
// @run-at      document-start
// ==/UserScript==
window.PromiseRejectionEvent = function(){}

damjang
Moon lover
Moon lover
Posts: 99
Joined: 2012-01-14, 11:22

Re: videos on rainews.it not visible

Unread post by damjang » 2023-11-02, 11:00

Thank you very mutch adoxa!
I tried your script and now the video box is visible, but I'm unable to watch any video, because it says that Temporarily media is not available, try later (Il media non è al momento disponibile. Prova più tardi)...

User avatar
adoxa
Fanatic
Fanatic
Posts: 170
Joined: 2019-03-16, 13:26

Re: videos on rainews.it not visible

Unread post by adoxa » 2023-11-02, 14:15

Ah, sorry, I saw that it started to download, then stopped it. Looks like a license issue, I'll investigate more later... (If you can't wait and can play HLS streams some other way, look at the Network Monitor for the m3u8 file.)

damjang
Moon lover
Moon lover
Posts: 99
Joined: 2012-01-14, 11:22

Re: videos on rainews.it not visible

Unread post by damjang » 2023-11-02, 16:56

Yes, no problem. Take your time. I can say that now in the time that it loads and before the error came out I can open the download link created by Rai Play video download script ( https://greasyfork.org/en/scripts/2128- ... o-download ) :D

User avatar
adoxa
Fanatic
Fanatic
Posts: 170
Joined: 2019-03-16, 13:26

Re: videos on rainews.it not visible

Unread post by adoxa » 2023-11-03, 03:19

I don't know what's going on. It gets the first segment okay, but then won't get the second.