Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Detect browser and switch between AV1 & hvec codec to guarantee fast playback with new codecs accross borwsers?

Detect browser and switch between AV1 & hvec codec to guarantee fast playback with new codecs accross borwsers?

Scheduled Pinned Locked Moved General Discussion
7 Posts 2 Posters 168 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lrm
    wrote on last edited by lrm
    #1

    This Reddit thread is basicly talking about what i would really love to see in laytheme:

    https://www.reddit.com/r/AV1/comments/kw504b/auto_detect_browser_type_and_browser_video/

    It would be awesome being able to upload alternative codec versions of the same video to make sure they play as fast as possible. H264 is just too large...

    This page also gives a good overview of the support status:

    https://caniuse.com/av1 - AV1 basicly supported everywhere but for mac only on M3 macs / iphone 15
    https://caniuse.com/hevc - Supported on all macs, but not supported on borswers like firefox and also not planned

    Hope you have a nice day!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lrm
      wrote on last edited by
      #2

      Also just wanted to add: I already tested to upload .mp4 video with AV1 codec to laytheme and it wroks falwless, just the caveat with safari in this case.

      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        Screenshot 2024-05-01 at 18.33.06.png

        maybe you could create a html element. +more → +html

        and then use

        <video autoplay muted playsinline loop>
            <source src="path-to-AV1.mp4" type="video/mp4; codecs=av01.0.05M.08">
            <source src="path-to-VP9.webm" type="video/webm; codecs=vp9">
            <source src="path-to-H264.mp4" type="video/mp4">
            This message is displayed when none are supported
        </video>
        

        as the guy in the reply suggests?

        1 Reply Last reply
        0
        • arminunruhA arminunruh referenced this topic on
        • L Offline
          L Offline
          lrm
          wrote on last edited by
          #4

          Thanks a lot Armin, i missed this post. So i can confirm it works...

          Tested it here:

          https://lrm.world/froggi-dancer/

          For videos with sound it would be great to have the custom playbutton also. Also setting placeholder thumbnails is of course a nice thing to have. Doing all of this always manually is a bit tedious. Would be lovely to be able to use the standard upload dialogue from laytheme and adding the alternate codecs this way.

          1 Reply Last reply
          1
          • L Offline
            L Offline
            lrm
            wrote on last edited by
            #5

            When i added the playbutton in manually i got weird layout shifts on click.... So yeah, would be osome to just use the standard html/video dialogue as there the checkboxes for player/ui/loop/mute are super handy.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lrm
              wrote on last edited by lrm
              #6

              Update on experiencing a strange issue:

              While with this page the video is playning fine for me on Firefox and Safari, it doesn't on Chrome:
              https://lrm.world/froggi-dancer/

              Its weird because I'm using the same codecs (AV1 & HVEC in the same order) as in this page where the videos load fine on Chrome, Safari & Firefox:
              https://lrm.world/circuit-choreography/

              The only obvious difference is that on the Frog page the video has Sound, there isn't autoplay but play on click, and full width.

              PS: When i access the uploaded video directly via Chrome it also plays, so theres something with the embed.

              Video link: https://lrm.world/wp-content/uploads/2024/05/FroggiRhythmDancer_Comp_V008_16x9_AV1-92.mp4

              Embed:

              <div class="html5video  "><div class="ph" style="padding-bottom:56.25%;">
                  <img class="html5video-customplayicon" src="https://lrm.world/wp-content/themes/lay/frontend/assets/img/play.svg" style="display:none">
                      <video preload="auto" data-w="1920" data-h="1080" style="aspect-ratio:1920/1080;" data-ar="0.5625" playsinline="" loop="1" class="no-lazyload playpauseonclick loaded userinteractedwith-playing">
                          <source src="https://lrm.world/wp-content/uploads/2024/05/FroggiRhythmDancer_Comp_V008_16x9_AV1-92.mp4" type="video/mp4; codecs=av01">
                          <source src="https://lrm.world/wp-content/uploads/2024/05/FroggiRhythmDancer_Comp_V008_16x9_H265_High.mp4" type="video/mp4">
                      </video>
                  </div>
              </div>
              
              1 Reply Last reply
              0
              • arminunruhA Offline
                arminunruhA Offline
                arminunruh
                Global Moderator
                wrote on last edited by
                #7

                this video is hilarious!

                can u make this video autoplay, muted and then use this setting where people can unmute the video using this sound icon/button maybe that works

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                I also code custom websites or custom Lay features.
                šŸ’æ Email me here: šŸ’æ
                info@laytheme.com

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                This often solves issues you might run into

                When you post:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search