SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Video Trouble

  1. #1
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Video Trouble

    I'm trying to build a cross-browser video player, but it won't work in Firefox 3.6 or Opera 10.6.

    When I took out the various "type" attributes, then it started working fine. I'm pretty sure I'd want to keep the types in, so what else am I doing wrong? If I encoded the videos with something different from what I specify in the type (that is, if I messed up but didn't know it), would that keep the video from playing?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,588
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Instead of

    Code:
    <video height="360" width="640" autoplay="" controls="" tabindex="0">
    	...
    </video>
    try

    Code:
    <embed height="360" width="640" autoplay="" controls="" tabindex="0">
    	...
    </embed>

  3. #3
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    When I change it to an embed, it just jumps straight to the Flowplayer Flash fallback. I'd like to utilize the native video players in the respective browsers, if I could.

  4. #4
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'm an idiot.

    I like to enclose my HTML attributes in double quotes. So I had the type attribute written out like so:

    HTML Code:
    <source src="x.mp4" type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'" />
    It turns out FF and Opera don't like that. They refuse to acknowledge the existence of different video sources unless the types are written out like this:

    HTML Code:
    <source src="x.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
    You catch that? Single quotes around the whole type, double quotes around the codecs. Once I did that, everything started working fine.

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, the spec for the codecs="" MIME parameter is anal and requires double quotes.
    Simon Pieters


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
  •