Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: video streaming

  1. #1
    Regular Coder
    Join Date
    Apr 2008
    Location
    Manila, Philippines
    Posts
    263
    Thanks
    3
    Thanked 12 Times in 12 Posts

    video streaming

    Hi

    Can someone give me any idea on how to handle these files..

    mov, mp4, wmv .. these are all video files.. the problem is..

    whenever I click a link..

    Code:
    <a href="movie.mp4">Stream</a>
    instead of streaming.. it downloads the file..

    I would like to stream in on a browser window.. safari.. not download it..

    I was told that it was doable in htaccess.. but i dont know where it should be placed..

    pretty much noob in this subject..

    Hope someone can teach me on how to do this..

    Thanks in advance..

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,387
    Thanks
    32
    Thanked 288 Times in 282 Posts
    Quote Originally Posted by jhaycutexp View Post
    Can someone give me any idea on how to handle these files..

    mov, mp4, wmv .. these are all video files.. the problem is..

    whenever I click a link..

    Code:
    <a href="movie.mp4">Stream</a>
    instead of streaming.. it downloads the file..

    I would like to stream in on a browser window.. safari.. not download it..

    I was told that it was doable in htaccess.. but i dont know where it should be placed..
    You should be linking to an HTML file with a video element.

    That said, it might be possible to do this with HTTP headers via .htaccess files assuming that Safari can natively playback MP4 files (or has a plug-in that can do it), though I can't tell you for sure since I don't own a Mac and therefore can't test Safari. Put the following code in an .htaccess file within the directory containing the relevant video files:

    Code:
    addType "video/mp4" .mp4
    header set content-disposition: inline
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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