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.

Do I need flash-fallback if the files are mp4?

Discussion in 'PHP' started by chrisj, Mar 17, 2015.

  1. #1
    The PHP video script I'm using coverts all (accepted format) files to mp4 upon upload.
    But the player code shows a flash fallback I believe. If all files are converted to mp4, prior to playing, is a flash-fallback at all necessary? If flash-fallback is not necessary can you help me tweak this player code so all files play in the video-js player, please? Any any other suggestions to improve this code are greatly appreciated:

    <video id="_1200k.mp4" class="video-js vjs-default-skin"
    preload="none" width="445" height="340" controls
    poster="[var.thumb_file]" data-setup='{techOrder: [‘flash’,’html5’}'>
    <source src="http://www.....com/uploads/[var.video_play]" type='video/mp4' />
    <object class="vjs-flash-fallback" width="445" height="340" type="application/x-shockwave- flash" data="https://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
    <param name="movie" value="/flowplayer/flowplayer-3.2.16.swf" />
    <param name="allowfullscreen" value="true" />
    <param name="flashvars" value='config={"playlist":["/[var.thumb_file]", {"url": "http://www.....com/uploads/[var.video_play]","autoPlay":false,"autoBuffering":true}]}' />
    <!-- Image Fallback. Typically the same as the poster image. -->
    <img src="[var.thumb_file]" width="640" height="264" alt="Poster Image" title="No video playback capabilities." />
    </object>
    </video>
    Code (markup):
     
    chrisj, Mar 17, 2015 IP
  2. emptee

    emptee Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Hey Chris,

    This question isn't really about PHP at all - but here goes..

    It really comes down to what browsers you want to support - as far as I know all HTML5 browsers support mp4, w3 seems to agree as well: http://www.w3schools.com/HTML/html5_video.asp

    So unless you want to support legacy browsers, flash isn't necessary.

    To remove it, just get remove the object element in it's entirety

    Cheers,
    Michael
     
    emptee, Mar 18, 2015 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Do you care about anything prior to IE9? Then YES you need a flash fallback. Do you care about desktop and notebook users who have 2ghz or slower processors while trying to deliver 720p or higher video? Then you might want to make VIDEO the fallback from flash instead of the other way around since most browser implementations don't support hardware acceleration. You may want to even go so far as to give users the choice to switch to what they prefer given that for some HTML 5 video is flaky unstable browser crashing ****, while for others flash is flaky unstable browser crashing ****!

    Do you care about Firefox users on windows who haven't done the "manual install" or Chromium users? Then you might want to include .OGG and .VP8 as well since MP4 is a no-go once the freetards get their panties in a wad about how open / not open the licensing is.

    Of course, keep in mind that MP4 is just the container, you need to use h.264 video encoding with AAC for maximum compatibility on that MP4 file; but beware that sometimes that fails where MP3 audio works -- and vice versa.

    Which is why HTML 5's mouth-breathingly idiotically redundant tag has turned video delivery into a bigger mess than the peak of the WMV vs. Quicktime vs. Realplayer wars when we were FINALLY settling on a standard; that it's a tag for no reason (redundant to OBJECT and in the process undoing the progress of 4 Strict) and leaves you at the whims of what browser makers just happen to feel like implementing; they've designed a way to lock you into their favorite pet mixes of codecs and containers, then sold it to the public as fighting vendor lock-in. That's such heavy duty grade A marketing BS, even the Catholic Church must be standing in awe of the W3C.
     
    deathshadow, Mar 19, 2015 IP