voc / voctoweb

voctoweb – the frontend and backend software behind media.ccc.de
GNU General Public License v3.0
188 stars 55 forks source link

Display error messages from javascript console #325

Open derpeter opened 6 years ago

derpeter commented 6 years ago

There are many reasons why the video resource could be unavailable. E.g. https://media.ccc.de/v/content18-52-berlin-werbefrei-no-advertisement-in-public-spaces- is blocked by addblocker. Also during the releasing process it can happen that the webm, that is used for Lin / Win is not available as early as the mp4. This makes the website unusable, e.g. the description text is than black on black.

Therefore the should be some placeholder for the videoplayer that preserver the layout of the page even if the video cant be loaded.

saerdnaer commented 5 years ago

I changed multiple things regarding the player page, can you check if the behaviour is now sufficient?

derpeter commented 5 years ago

looks good now. thanks for fixing. But this introduces a new "issue" as i get now a video player with play button but i cant click it, because the adblocker still blocks the content. Can we have an error message in cases the video file cant be loaded for a particular reason? I assume we need to do that in JS.

saerdnaer commented 5 years ago

We could add a banner at the bottom of the page, to make errors in the javascript console more visable

window.onerror = function(error, url, line) {
    addBanner({acc:'error', data:'ERR:'+error+' URL:'+url+' L:'+line});
};
derpeter commented 5 years ago

easylist has now whitelisted us https://github.com/easylist/easylist/commit/47b6a3fffb1d6a3701ac917b0bd4bd0f64cbeb7c

I like your approach with the banner! This would also improve error reporting. We may also add the url of the selected mirror there.