Fixes missing live chat on YouTube livestreams. Reloads once, then forces chat to appear instantly on every stream. Fixed for archived livestreams
< 脚本 YouTube Live Chat Resurrection 的反馈
Using meta[itemprop="isLiveBroadcast"] to determine whether it is live or not is not recommended. Because when you switch to another video, meta will remain the same.
1) Use DOM to detect the "Live" Red rot in the player or not.
2) Use #microformat > player-microformat-renderer > script content to get the latest isLiveBroadcast
3) document.querySelector("ytd-page-manager#page-manager").getCurrentData().playerResponse.microformat.playerMicroformatRenderer.liveBroadcastDetails
4) document.querySelector("ytd-live-chat-frame#chat").data.liveChatRenderer.isReplay
Alternative for No4
4b) document.querySelector("ytd-live-chat-frame#chat").get("data.liveChatRenderer.isReplay")
4c) document.querySelector("ytd-live-chat-frame#chat").isChatReplay()
I will look into this, thank you for your feedback
No Service Workers extension suddenly work after browser update, you can use that without my script until I address all the problems with my script, thank you for being patient and guided me how to do it right
No worry. You can update later.
And also, just to remind that, the video id change in the url is just start to load info. then the script in #microformat will update.
Once that #microformat script is updated, the chatframe can find the correct new video id. (of course the mechanism is not reading it directly. just the sequence is like this)
Before that, it might still use the old video id internally.
So when video id change in url, you start the reloading, the chatframe might still load the previous video chatroom.
I don't know why it hasn't happened to me yet, that's why I didn't how to test it because my code still working for me and didn't meet the situation like you mentioned, so it's kinda hard for me to test, do you use any other extensions evolve youtube?
👍