If you don't want to install Google Chrome you can follow these steps:
Go here: https://gist.github.com/ruario/3c873d43eb20553d5014bd4d29fe37f1
Download the script then run. It will automatically download libwidevinecdm.so
to opt/google/chrome/libwidevinecdm.so
.
In Opera 64 on Ubuntu 18.04, that directory defined inside /usr/lib/x86_64-linux-gnu/opera/resources/widevine_config.json
. It might change in future versions, so keep in mind.
I just tested on Spotify Web Player, which works perfect.