6 Replies - 924 Views - Last Post: 06 April 2013 - 05:07 PM

#1 PrinceAsfi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-March 12

Video file/song stream in website

Posted 06 April 2013 - 08:17 AM

Hello i'm writing a code for video streaming in my website. i'm new to html/css/js. so please tell me how do i stream a video song.

I have the video song which is mp4. and here is my code for it and Also check the screen shot that i have attached for its output.

HTML CODE



<center><div class="video">
<div style="text-align:center"> 
  <button onclick="playPause()">Play/Pause</button> 
  <button onclick="makeBig()">Big</button>
  <button onclick="makeSmall()">Small</button>
  <button onclick="makeNormal()">Normal</button>
  <br> 
  <video id="Video" width="400">
    <source src="Videosong1.mp4" type="video/mp4">

    Your browser does not support HTML5 video.
  </video>
</div> 
</center>

</div>



Videosong1.mp4 is the song that i want to play, it is in the same folder of my website.

CSS CODE

.video {
height:800px;
width:640px;
float:inherit;

}

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: Video file/song stream in website

#2 galtech  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 13
  • Joined: 16-March 13

Re: Video file/song stream in website

Posted 06 April 2013 - 09:52 AM

Hi PrinceAsfi,

When streaming audio/video, might I suggest uploading to YouTube, Vimeo,Soundcloud and inserting embed code into your page.

galtech
Was This Post Helpful? 0
  • +
  • -

#3 PrinceAsfi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-March 12

Re: Video file/song stream in website

Posted 06 April 2013 - 01:22 PM

Okay i will do that !.. is there any way to do myself like im doing above?

This post has been edited by Dormilich: 06 April 2013 - 03:56 PM

Was This Post Helpful? 0
  • +
  • -

#4 galtech  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 13
  • Joined: 16-March 13

Re: Video file/song stream in website

Posted 06 April 2013 - 01:46 PM

You could also try one of the following approaches:

1) <embed src=""></embed> - file will look for WMP / Quicktime installed on user PC to play
2) Point to file stored on your web host using FLV Player (http://flvplayer.com/) which will provide you with an embed code.


You can also try to create a video player of your own for your website, but this would be a lot of work. Existing technology should do the trick.

regards,

galtech
Was This Post Helpful? 1
  • +
  • -

#5 Koyume  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 89
  • Joined: 19-February 13

Re: Video file/song stream in website

Posted 06 April 2013 - 03:05 PM

Couple of things. The <center tag is depreciated in HTML 5. There's numerous ways in doing that.

Also, to be able to do the "play" options and such, you need to use a script language (like Javascript or jQuery)

Using the Embed deal works as well, but a lot depends on what YOU are wanting to do.
Was This Post Helpful? 0
  • +
  • -

#6 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3642
  • View blog
  • Posts: 12,621
  • Joined: 12-December 12

Re: Video file/song stream in website

Posted 06 April 2013 - 03:51 PM

The word is deprecated :)/> ..although, in HTML5, the center tag is no longer supported, rather than just being deprecated.

This post has been edited by Dormilich: 06 April 2013 - 03:56 PM

Was This Post Helpful? 0
  • +
  • -

#7 Koyume  Icon User is offline

  • D.I.C Head

Reputation: 15
  • View blog
  • Posts: 89
  • Joined: 19-February 13

Re: Video file/song stream in website

Posted 06 April 2013 - 05:07 PM

View Postandrewsw, on 06 April 2013 - 04:51 PM, said:

The word is deprecated :)/>/> ..although, in HTML5, the center tag is no longer supported, rather than just being deprecated.

My spelling sucked today. Don't need to point that out :P

And it may not be supported, but it still can be used....just...not smart-like.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1