Currently I create a html5 video player component for an universal nuxtjs/vuejs app. There is an autoplay attribute for the video tag to start videos after navigate to them. Usually browsers don't do that directly after page load, it's prohibited. I need a variable in my component to know if autoplay will be possible to style elements based on this information. In other words: The variable should be true if the current page was only rendered on client-side, but false if it was rendered on server-side first.
It's not possible to work with "window.history.length" because the autoplay will also not be possible after refresh, although this would not have an effect on the history length.
Also it's not possible to set a variable in the "created" method since it will be called on server- and client-side too.
