SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mobile Video: Need help figuring out how this is done

    The other day I was looking at the mobile site for CBS (m.cbs.com) and noticed that they have a bunch of videos you can watch. The way they have it set up is that you click on a link (or image) and the video launches in the default video player of the mobile device. It seems to work great for both Android and iOS.

    Does anyone know how you would go about doing (coding) this?

    Thanks for you help.

    Nate

  2. #2
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <a href="link-to-video.mp4" onclick="this.play();">click to play video</a>
    This seems to work like I want, at least on android. Would this work on other mobile devices as well?

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,388
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nate s View Post
    The other day I was looking at the mobile site for CBS (m.cbs.com) and noticed that they have a bunch of videos you can watch. The way they have it set up is that you click on a link (or image) and the video launches in the default video player of the mobile device. It seems to work great for both Android and iOS.

    Does anyone know how you would go about doing (coding) this?

    Thanks for you help.

    Nate
    The device will automatically play a video in full-screen mode. No special coding required. I believe I use the HTML5 <video> tags in iOS and YouTube's <embed> tags in Android, and both default to full-screen mode without extra coding.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •