Read the URL of currently open tab in a browser, every time it changes I use Logitech media server (LMS) to play my music on a DLNA device. The server also has a youtube plugin and can play the sound of youtube videos if a specific url, which contains the youtube video id, is opened. For example http://myLMS:9000/status.html?p0=playlist&amp;p1=play&amp;p2=youtube://wS1drVzZPmw&amp;player=myPlayer. 

But it only plays back a single video this way. And I'd like them to autoplay, the way they do when youtube is accessed with a browser.

One way to do this, would be to open a browser and read the youtube url every time it changes, somehow, extract the video id from the url, and then forward it to LMS by generating a link, similar to the one I posted above, but containing the id of the video, that was extracted from the youtube url.

The generating and opening of the custom link for the LMS should not be too difficult, by using tasker, I think. But I suspect getting the url from the browser and constantly checking if it changed, would be more difficult.

So - is it possible to read the URL of currently open tab in a browser, every time it changes, and store it as text somewhere?

Or maybe the youtube app on android stores the id of the video it is currently playing somewhere. That might work also, if we could read it somehow. I think the youtube app also autoplays the videos.
Apps on Android can't access data of other apps. Therefore you can't just read the current URL of a web browser like chrome. 

If this would be possible every app with advertisements would do so and report all the URLs you are visiting in the web browser back to some ad network. As you can see such an interface would be a privacy nightmare.  

Hence the only chance to get what you want to do it inside of a browser-plugin.
However I don't think that there is any browser-plugin for Chrome, Firefox or another web browser on Android that would do what you want. Hence you would have to develop your own web browser plugin (please note that development topics are off-topic on this site).