Support » Fixing WordPress » chromeless Youtube video not working on mobiles

  • Hi, anyone facing problem with the above problem. everything wrks well on desktop but not mobile. -> [video src="https://www.youtube.com/watch?v=videocodehere"]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The video shortcode does not work on mobile devices. This is a know bug that is being addressed in a future core update.

    Thread Starter evette23

    (@evette23)

    Thanks for the headsup Evan 🙂

    No problem at all! I can’t seem to find the trac article that outlines the issue. I am developing a YouTube plugin that uses the video shortcode and noticed that on mobile devices the videos do not play.

    One way I managed to work around the issue (temporarily until it’s fixed) is by writing a conditional to check for mobile devices specifically. If you’re simply using the shortcode inside of the content editor, this method won’t work for you. But for others coming across this posting, using the shortcode in template files this is what I did :

    if ( !is_wp_mobile() ) { // if it is not a mobile device
      // video shortcode here
    } else {
      // standard iframe here
    }

    which seems to work fairly well. Unfortunately the players are different between mobile and desktop devices, but for the time being that will have to suffice.

    Best of luck,
    Evan

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘chromeless Youtube video not working on mobiles’ is closed to new replies.