+ 1
In <audio > or <video > element if we don't give controls attribute, its not working.Why is it so?
Instead only controls (like play, pause, download) shouldn't be available but video or audio should work.
15 Réponses
+ 4
On a desktop, IE 11, FF, Chrome and Safari all play with just 'autoplay'. It appears that it is probably intentional that mobile browsers will not allow 'autoplay' to work without the 'controls', because it would be very annoying not to be able to turn of a video or an audio. With neither present, logically the player should not work.
Btw, for some reason there are two versions of this topic.
+ 3
Another piece of information:. The autoplay attribute does not work in mobile devices like iPad and iPhone. I will check several desktop browsers later today.
+ 3
a jquery/any other js plugin might help, what do you guys think???
+ 2
you cannot play without controls, you have to make it auto play i think
+ 2
I will. check further tomorrow.
+ 1
You can use autoplay, but cannot control the playing.
+ 1
@Rinmawia I checked using only autoplay also
but still it's not working in the code playground:
https://code.sololearn.com/WQHjT54jxOHv/?ref=app
+ 1
try adding 'autoplay' attribute
+ 1
On computer or mobile? echo browser
+ 1
which browser
+ 1
@victor code playground Android app (Mobile)
+ 1
ok
+ 1
thanks a lot victor
+ 1
its working but visitor can not control the audio&video.
+ 1
@Rinmawia. The beauty of HTML5 audio/video is it's simplicity. The HTML5 DOM has methods, properties, and events for the <audio> and <video> elements. These methods, properties, and events allow you to manipulate <audio> and <video> elements using JavaScript. See: https://www.w3schools.com/tags/ref_av_dom.asp