Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8404517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:37:11+00:00 2026-06-09T22:37:11+00:00

is it possible to have a div tag that is visible only in specific

  • 0

is it possible to have a div tag that is visible only in specific devices?

We have a video page that has HTML5 fallback that plays well on desktop and iOS devices but not on Android (specifically samsung S3)

I did some research and the probable reason behind it is that .m3u8 is not fully supported in android and RTSP has more success reports.

I’d like to put a div tags under our video embed code that will only show on android devices.

Something like…

<div id="androids"><a href="rtsp_url">Android user please click here to watch video</a></div>

Is this possible?

By the way. i am using JW Player on my page.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:37:13+00:00Added an answer on June 9, 2026 at 10:37 pm

    Try this:

    HTML:

    <div id="video"></div>
    

    JavaScript:

    var ua = navigator.userAgent.toLowerCase();
    var isAndroid = ua.indexOf('android') > -1;
    
    var videoDiv = document.getElementById('video'); 
    
    if(isAndroid) {
      videoDiv.innerHTML = '<a href="rtsp_url">Android user please click here to watch video</a>';
    } else {
      //add something else
      videoDiv.innerHTML = '<video>This is HTML 5 video for non-Android users</video>';
    }
    

    To explain: JavaScript finds out if user use Android or not. If users use Android it adds <a href="rtsp_url">Android user please click here to watch video</a> to <div id="video">, if not it adds regular HTML 5 <video> tag.

    Note: Instead of <video>This is HTML 5 video for non-Android users</video> add your video code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to have a div tag that has 1px black borders and
I have an one div inside that an anchor tag like this. <div onclick=page
Is it possible to have a free iPhone app that has say an initial
I have div tag, I have a free text(on its own) in that tag.
suppose i have one div and div has img tag like <div><img src='img1.png'/></div> so
I have text inside a DIV tag. Is it possible to change the text
.I have a div tag that is also divided into two divs. here is
Possible Duplicate: jQuery: how do I animate a div rotation? I have a div
is it possible to have a specific element on top of the list? backgoround:
Is it possible to have unobtrusive validation to make a field required but only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.