Below code is working fine in Mozilla & Chrome. But in Safari the video doesn\'t play.
Safari has started (in the last year) preventing videos with audio tracks from auto-playing by default. They never specifically publicised this as far as I'm aware, however I believe it was part of the following changes:
Safari 11 also gives users control over which websites are allowed to auto-play video and audio by opening Safari’s new “Websites” preferences pane
(Source)
The only real workarounds for this are to either remove the audio track from the video, or have it muted by default.
If your server can detect the requester's browser, you can apply this to just Safari, leaving other browsers as they were before.