Tag:audio

  • The basic method of embedding audio and video playback in web pages using HTML5

    Time:2021-9-5

    HTML5 features, including native audio and video support without flash. HTML5 < audio > and < video > tags make it easy to add media to the site. We only need to set the SRC attribute to identify media resources, including the controls attribute, so that users can play and pause media. Embedded videoThe following […]

  • On H5 custom audio (problems and solutions)

    Time:2021-3-19

    H5 activities need to insert audio, but also need to customize the style, so write your own html XML/HTML CodeCopy content to clipboard <! — cur represents the current time, Max represents the total time, and input represents the progress bar — >   <span class=‘cur’></span><input type=“range” min=0 max=100 class=‘range’ value=0><span class=‘max’></span>   css CSS CodeCopy content to clipboard /*Progress bar*/   .range {        width: 5.875rem; […]

  • Solve the problem that IOS audio cannot play

    Time:2021-1-15

    In IOS, audio can’t pass through directly audio.play () to play, the user needs to execute it in the click event or touch event audio.play () to play. Ajax callback audio.play () the music doesn’t play properly. The user clicks the button and plays the corresponding successful or failed music after the server returns the […]

  • Quickly solve the problem that audio cannot play automatically under IOS wechat

    Time:2020-4-14

    As we all know, Safari under IOS can’t play music automatically, and it’s useless to take the initiative to start clicking events, Wechat can solve the problem with the following methods document.addEventListener(“WeixinJSBridgeReady”, function () { audio.play(); }, false); But now it can be called directly when wechat is ready wx.ready(function() { audio.play(); }); The above […]

  • Solve the problem that audio in HTML5 can’t play automatically on mobile phone and wechat

    Time:2020-1-16

    When doing the H5 page again, I found that audio can’t play automatically after autoplay is added to the mobile phone and wechat. This is because the mobile phone is set to save vagrancy The usual solution is to give an interactive event: Label: <audio loop src=”/photo/aa.mp3″ id=”audio” autoplay preload=”auto”> The browser does not support […]

  • Solution of Audio Format Supported by Audito in HTML 5

    Time:2019-5-15

    HTML5 Audio tags can support wav, mp3, ogg, acc, WebM and other formats, but a very important music file format MIDI (extension mid) has no built-in support in major browsers. Not all browsers support MP3 OGG and so on. Each browser supports different formats because of copyright issues. Browser and Audio Compatibility Not all browser […]