How to make music autoplay and loop in background - html

I am currently using this and the autoplay seems to work but the loop doesn't work.
<div id="music"><embed src="Anne_Marie - 2002 [Official Video].mp3" autostart=true loop=true></div>
Also, I wanna make it like background music so the play buttons don't show up.

The loop attribute makes the audio file loop.
The autoplay attribute makes the file start playing without the user
needing to play the file.
The controls attribute shows the controls, omitting it will hide the
controls.
<audio loop autoplay>
<source src="path/to/file" type="audio/filetype">
</audio>
Audio filetype can be: .mp3, .wav, .ogg

this audio work for me:
<audio autoplay loop src="music/music.mp3"></audio>

Related

the audio tag doesn't make me move the control cursor

I have the audio tag with an audio connected locally via the src. I noticed, however, that I cannot go forward with the control cursor, to skip a piece of music. How is this possible? There is a solution? Thanks
result unexpected
<audio
id={"audio" + nameAudio.id}
className="w-100"
controls
controlsList="nodownload"
autobuffer
>
<source
src={`/uploads/audiofile/${nameAudio.nameAudio}`}
type="audio/mp3"
/>
</audio>
I can't post all code. I use React. but this is all for the audios.

Latest IOS10 Autoplay Enable

Anyone does have the idea of how apply the html5 code for video and allow autoplay in Ios10 or latest? Cause seems like Ios10 do have the latest update and it couldn't allow Autoplay. Following are the tag that im using.
<video preload="auto" id="lady_vid">
<source src="vid/lady.mp4" type="video/mp4"></source>
</video>
I was able to enable autoplay by using the following code:
<video autoplay muted playsinline>
<source src="http://example.com/video.mp4">
</video>
You need autoplay to enable autoplay.
You need muted, because only videos without audio track or with disabled audio track can be autoplayed.
You need playsinline, because only inlined videos can be autoplayed. This will also cause your video to be displayed inside the page itself and not be opened in fullscreen video view.
I was only able to enable it after specifying full url to the video, e.g. http://example.com/video.mp4 (this is a fake url obviously). It was not working with relative url, such as
<source src="video.mp4">
or
<source src="folder/video.mp4">
===========
Update:
After testing video on iOS10 for a while, I've realized that iOS10 fails to play a lot of videos. It's not a codec problem: if you encode two videos with exactly the same parameters, one might play and the other one won't.
What's even more intresting, is that most videos that cannot be played on iOS10 play perfectly well on iOS9 and iOS8.
So if your video isn't playing, try opening it with iOS Safari browser via direct link - maybe it doesn't work at all on iOS10.

PyQt5 QWebview, QWebPage will not loop html5 video

Running on Windows 10, but problem is in 7 and 8 as well.
The html loaded into the QWebview's QWebPage, the video uses the html 'video' tag, and parameter 'loop'.
<video preload="none" loop muted class="video-tag" poster="some_pic.jpg">
<source src="some_video.mp4" type="video/mp4">
</video>
If I visit the page on my browser, the video loops as intended.
The QWebView QWebPage will only play the video once, then fallback to a preset .jpg, and if cursor exits the movie and returns, the movie will play again.
I tried setting QWebPage:ToggleMediaLoop action, by calling:
self.page().action(QtWebKitWidgets.QWebPage.ToggleMediaLoop).setChecked(True)
And verified, by calling the following line before (False) and after (True):
self.page().action(QtWebKitWidgets.QWebPage.ToggleMediaLoop).isChecked()
From documentation: "Toggles whether the hovered audio or video should loop on completion or not"
Am I not setting the action properly?
Am I missing a .dll?
Is "loop" not supported by QtWebKit?
Thank you! =)

Html audio element does not load file from URL

I need your help.
I want to put a link of the music into the audio tag and it seems like this:
<audio controls autoplay>
<source src="http://www.boxca.com/lctj4xdqkhjr/Evgeny_Grinko_-_Вальс_.mp3.html" type="audio/mpeg">
<source src="http://pressplayaudio.com/?artist=Evgeny-Grinko&track=Field.ogg" type="audio/ogg">
Your browser does not support the audio element.
</audio>
But, it doesn't work and I don't know what's the problem.
you're trying to link an html website with some audio player on it, instead of referencing real audio files. This wont work.
You need to provide a reference to a physical file that you host somewhere

Embed videos which have no control options and close option in HTML document

I am trying to embed a video file (mp4) into my HTML document. I would like this video to play without being paused and without being closed/minimized.
<video width="320" height="240">
<source src="mov.mp4" type="video/mp4">
</video>
I am using this code to play a video in HTML. But I am not able to remove controls from the video. If I right click on the video, I still get the control options.
So I would like to know if there is a way to disable controls on this video or use another player which can remove controls.
I would also like to know if I can dynamically write some display data on the video space while it is being played.