1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Adding audio and video file.

Discussion in 'HTML & Website Design' started by valo manus, Nov 10, 2013.

  1. #1
    I am learning HTML and CSS. But I can not add able to add audio and video file by HTML code. What can I do?
     
    valo manus, Nov 10, 2013 IP
  2. bhunda

    bhunda Greenhorn

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    use html 5 for this.
     
    bhunda, Nov 10, 2013 IP
  3. Rakshith Daniel

    Rakshith Daniel Active Member

    Messages:
    104
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    83
    #3
    Yes, you can use HTML 5 for this because HTML 5 has lots of improvements from the previous versions of HTML. In HTML 5 you can add video's in <video> </video> tags.
     
    Rakshith Daniel, Nov 11, 2013 IP
  4. valo manus

    valo manus Greenhorn

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    but my pc does not support. a cross is seen..
     
    valo manus, Nov 11, 2013 IP
  5. Rakshith Daniel

    Rakshith Daniel Active Member

    Messages:
    104
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    83
    #5
    Are you building a template/

    What do you want ? Add video in posts or add video player to your site.
     
    Rakshith Daniel, Nov 11, 2013 IP
  6. jamjar919

    jamjar919 Well-Known Member

    Messages:
    332
    Likes Received:
    7
    Best Answers:
    5
    Trophy Points:
    180
    #6
    Well, there have been pretty much 0 useful responses so far, pretty much boiling down to "use HTML 5".

    You CAN use HTML 5 to add video to your web pages, however I believe the hassle of converting to three different formats of which you host all three can be more trouble than it's worth. If you want to use it, you can find instructions at html5rocks.com/en/tutorials/video/basics/.

    However, the easiest and simplest option is probably going to be to add your video to YouTube or Vimeo, and use the Embed code that comes with it. The Audio equivalent of these is SoundCloud. Of the options, it's probably the easiest method and the quickest. If you're hosting things not allowed on YT/Vimeo, then you'll have to install some sort of player or use HTML5 unless anyone can come up with another solution I didn't think of?
     
    jamjar919, Nov 13, 2013 IP
  7. vjproduction

    vjproduction Greenhorn

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #7
    Here is the example for audio, nice and simple:
    <audio class="optional" id="example"><source src="http://yourdomain.com/folder/example.wav" preload="auto"/></audio>
    <script type="text/javascript">var sample = document.getElementById("example"); example.volume='0.3';</script>
    HTML:
    preload="auto" plays the file on page load. you can set "none" if you don't want that (or remove it completely).

    This is what I know and this works for audio. Since the video needs to be visible (unlike audio), especially if you want player with some controls, this obviously isn't enough, but at least you have a good starting point.
     
    Last edited: Nov 14, 2013
    vjproduction, Nov 14, 2013 IP
  8. John Michael

    John Michael Member

    Messages:
    154
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #8
    You can use Audio and video elements in HTML5 . For html5 you must change your html 4 doctype .
     
    John Michael, Jan 17, 2014 IP