Of course, it is best not to refresh the page, but if you copy the browser link, you hope to be able to locate the video you broadcast next time. The method is very simple, just change the fragment of the url.
Monitoring fragment changes is the core of this type of programming. In mainstream browsers (IE Firefox), there is an onhashchange event to monitor fragment changes.
However, there are some differences in their behavior. In IE versions before IE8, when the window.location object changes rapidly, onhashchange will not be triggered, which is a very strange bug.
The onhashchange event I wrote below has no browser differences. And a function has been added. When the page is initialized, if there is a fragment in the url, the
onhashchange event will also be triggered.