Author Topic: <video> tag  (Read 3621 times)

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
<video> tag
« on: December 30, 2011, 07:52:52 PM »
I am trying to use the <video> tag and can't get it to work. Am I doing something wrong or TD doesn't understand HTML 5?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: <video> tag
« Reply #1 on: December 31, 2011, 09:53:59 PM »
TD doesn't know a thing about <video>, but it doesn't have to.  It's IE that needs to know.  I'm fairly sure the problem is that the <video> tag requires that the page have a <!DOCTYPE> specification.  Here was my little test.  I created a simple text file with the following in it (example from w3schools.com documentation on the <video> tag):

<html>
<body>

<video width="320" height="240" controls="controls">
  <source src="http://www.w3schools.com/html5/movie.mp4" type="video/mp4" />
  <source src="http://www.w3schools.com/html5/movie.ogg" type="video/ogg" />
  Your browser does not support the video tag.
</video>

</body>
</html>


Using IE9, this shows a blank page with just the text "Your browser does not support the video tag.".  However, if you add the following as the first line of the HTML:

<!DOCTYPE html>

Then refresh the page, a video shows up.  Unfortunately, it won't work even if you use an <iframe>.  The main window hosting the iframe apparently needs the DOCTYPE specification, too.  I tried adding the DOCTYPE specification to the TD and it essentially blows the entire Game Window and most dialogs to hell.  So I could and may add it someday, but I will need to do some good research into all of the ramifications of this, and figure out everything I'll have to fix, then do a boatload of testing.

There may be a workaround that I am unaware of ...

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: <video> tag
« Reply #2 on: January 01, 2012, 11:47:08 AM »
If simply adding the <!DOCTYPE html> fixes this issue I see no need to tinker with any coding under the hood. Adding 12 characters to the beginning of any code is no issue.
Thanks for the help

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: <video> tag
« Reply #3 on: January 01, 2012, 07:30:06 PM »
That works for IE, but it doesn't work in the TD.  It will only in the TD if I add that <!DOCTYPE html> in the core TD code, but doing so affects a lot of other things as well.  Wasn't sure if I had made that clear.

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: <video> tag
« Reply #4 on: January 01, 2012, 07:35:27 PM »
I assumed I could simply add the <!DOCTYPE html> to the beginning of my cell.